Skip to content

Commit 144e049

Browse files
Increased coverage and enabled YCSB local runs (#67)
* [fix] Fixed redis-benchmark test time utils * [wip] YCSB support * [add] Updated Readme with YCSB info * [add] Increased further the coverage * [wip] further refactoring on run_local ( breaking into smaller chuncks) * [wip] Increased coverage and enabled YCSB local runnable fetching * [wip] YCSB configuration being properly prepared. * [wip] further prunning of dead code * [add] removed seaborn, numpy, pandas, and matplotlib from deps * [wip] Bumping version from 0.1.58 to 0.1.59
1 parent 19d96cb commit 144e049

26 files changed

+371
-562
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
*.tar.gz
55
*.csv
66
*.txt
7+
binaries
8+
datasets
79

810
# Byte-compiled / optimized / DLL files
911
__pycache__/

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ Current supported benchmark tools:
2020
- [redisgraph-benchmark-go](https://github.com/RedisGraph/redisgraph-benchmark-go)
2121
- [ftsb_redisearch](https://github.com/RediSearch/ftsb)
2222
- [redis-benchmark](https://github.com/redis/redis)
23+
- [YCSB](https://github.com/RediSearch/YCSB)
2324
- [SOON][memtier_benchmark](https://github.com/RedisLabs/memtier_benchmark)
2425
- [SOON][aibench](https://github.com/RedisAI/aibench)
26+
- [SOON][redis-benchmark-go](https://github.com/filipecosta90/redis-benchmark-go)
2527

2628
## Installation
2729

pyproject.toml

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "redisbench-admin"
3-
version = "0.1.58"
3+
version = "0.1.59"
44
description = "Redis benchmark run helper. A wrapper around Redis and Redis Modules benchmark tools ( ftsb_redisearch, memtier_benchmark, redis-benchmark, aibench, etc... )."
55
authors = ["filipecosta90 <[email protected]>"]
66
readme = "README.md"
@@ -10,16 +10,13 @@ redisbench-admin = "redisbench_admin.cli:main"
1010

1111
[tool.poetry.dependencies]
1212
python = "^3.6.1"
13-
pandas = "^1.0.4"
1413
humanize = "^2.4.0"
1514
requests = "^2.23.0"
1615
py_cpuinfo = "^5.0.0"
1716
redis = "^3.5.3"
1817
boto3 = "^1.13.24"
1918
tqdm = "^4.46.1"
2019
toml = "^0.10.1"
21-
seaborn = "^0.10.1"
22-
matplotlib = "^3.2.1"
2320
redistimeseries = "^1.4.3"
2421
redis-py-cluster = "^2.1.0"
2522
paramiko = "^2.7.2"
@@ -28,7 +25,6 @@ pysftp = "^0.2.9"
2825
python_terraform = "^0.10.1"
2926
GitPython = "^3.1.12"
3027
PyYAML = "^5.4.0"
31-
numpy = "^1.15.4"
3228
wget = "^3.2"
3329

3430
[tool.poetry.dev-dependencies]

redisbench_admin/cli.py

+1-8
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,9 @@
22
import logging
33
import sys
44

5-
# import toml
65
import toml
76

87
from redisbench_admin import __version__
9-
from redisbench_admin.compare.args import create_compare_arguments
10-
from redisbench_admin.compare.compare import compare_command_logic
118
from redisbench_admin.export.args import create_export_arguments
129
from redisbench_admin.export.export import export_command_logic
1310
from redisbench_admin.extract.args import create_extract_arguments
@@ -68,8 +65,6 @@ def main():
6865
parser = create_run_local_arguments(parser)
6966
elif requested_tool == "extract":
7067
parser = create_extract_arguments(parser)
71-
elif requested_tool == "compare":
72-
parser = create_compare_arguments(parser)
7368
elif requested_tool == "export":
7469
parser = create_export_arguments(parser)
7570
elif requested_tool == "--version":
@@ -79,7 +74,7 @@ def main():
7974
print_help(project_name, project_version)
8075
sys.exit(0)
8176
else:
82-
valid_tool_options = ["run-local", "run-remote", "export", "compare", "retrieve"]
77+
valid_tool_options = ["run-local", "run-remote", "export", "extract"]
8378
print_invalid_tool_option(requested_tool, valid_tool_options)
8479
sys.exit(1)
8580

@@ -89,8 +84,6 @@ def main():
8984
run_local_command_logic(args)
9085
if requested_tool == "run-remote":
9186
run_remote_command_logic(args)
92-
if requested_tool == "compare":
93-
compare_command_logic(args)
9487
if requested_tool == "export":
9588
export_command_logic(args)
9689
if requested_tool == "extract":

redisbench_admin/compare/args.py

-38
This file was deleted.

redisbench_admin/compare/compare.py

-139
This file was deleted.

redisbench_admin/export/common/common.py

+23
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,26 @@ def get_kv_tags(
110110
{"git_sha": git_sha},
111111
]
112112
return common_broader_kv_tags, common_git_sha_kv_tags, common_version_kv_tags
113+
114+
115+
def get_metric_detail(key_metric_spec):
116+
metric_step = get_or_None(key_metric_spec, "step")
117+
metric_family = get_or_None(key_metric_spec, "metric-family")
118+
metric_json_path = get_or_None(key_metric_spec, "metric-json-path")
119+
metric_name = get_or_None(key_metric_spec, "metric-name")
120+
metric_unit = get_or_None(key_metric_spec, "unit")
121+
metric_type = get_or_None(key_metric_spec, "metric-type")
122+
metric_comparison = get_or_None(key_metric_spec, "comparison")
123+
metric_per_step_comparison_priority = get_or_None(
124+
key_metric_spec, "per-step-comparison-metric-priority"
125+
)
126+
return (
127+
metric_step,
128+
metric_family,
129+
metric_json_path,
130+
metric_name,
131+
metric_unit,
132+
metric_type,
133+
metric_comparison,
134+
metric_per_step_comparison_priority,
135+
)

redisbench_admin/export/export.py

+2-17
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
from redistimeseries.client import Client
66

77
from redisbench_admin.export.common.common import split_tags_string
8-
from redisbench_admin.export.ftsb_redisearch.ftsb_redisearch_json_format import (
9-
ftsb_export_logic,
10-
)
8+
119
from redisbench_admin.export.redis_benchmark.redis_benchmark_csv_format import (
1210
redis_benchmark_export_logic,
1311
)
@@ -35,20 +33,7 @@ def export_command_logic(args):
3533
print("Using the following extra tags: {}".format(extra_tags_array))
3634
results_type = "key-results"
3735
time_series_dict = {}
38-
if results_format == "ftsb_redisearch":
39-
benchmark_results = retrieve_local_or_remote_input_json(
40-
benchmark_files, local_path, "--benchmark-result-files", "json"
41-
)
42-
for filename, benchmark_result in benchmark_results.items():
43-
time_series_dict = ftsb_export_logic(
44-
benchmark_result,
45-
extra_tags_array,
46-
included_steps,
47-
results_type,
48-
time_series_dict,
49-
use_result,
50-
)
51-
elif results_format == "redis-benchmark":
36+
if results_format == "redis-benchmark":
5237
benchmark_results = retrieve_local_or_remote_input_json(
5338
benchmark_files, local_path, "--benchmark-result-files", "csv"
5439
)

redisbench_admin/export/ftsb_redisearch/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)