Skip to content

Commit 6393d90

Browse files
Fixed remote results fetching from benchmark client (#369)
* Fixed execute_init_commands bug on L446 * Fixed remote results fetching from benchmark client * Extra logging on results fetching * Fixed is_ycsb_java check
1 parent 65e265c commit 6393d90

File tree

4 files changed

+38
-6
lines changed

4 files changed

+38
-6
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "redisbench-admin"
3-
version = "0.9.12"
3+
version = "0.9.15"
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 <filipecosta.90@gmail.com>","Redis Performance Group <performance@redis.com>"]
66
readme = "README.md"
@@ -36,7 +36,7 @@ daemonize = "^2.5.0"
3636
pandas = "^1.0"
3737
ansicolors = "^1.1.8"
3838
matplotlib = "^3.1.2"
39-
numpy = "^1.17.4"
39+
numpy = "^1.23.1"
4040
psutil = "^5.6.6"
4141
scipy = "^1.3.3"
4242
Jinja2 = "^3.0.3"

redisbench_admin/cli.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929
from redisbench_admin.watchdog.args import create_watchdog_arguments
3030
from redisbench_admin.watchdog.watchdog import watchdog_command_logic
3131

32-
numpy.random.BitGenerator = numpy.random.bit_generator.BitGenerator
33-
3432
LOG_LEVEL = logging.DEBUG
3533
if os.getenv("VERBOSE", "0") == "0":
3634
LOG_LEVEL = logging.INFO

redisbench_admin/run_remote/remote_client.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ def run_remote_benchmark(
352352

353353
logging.info("Extracting the benchmark results")
354354
remote_run_result = True
355-
if "ycsb" not in commands[0] or "go-ycsb" in commands[0]:
355+
if is_ycsb_java(commands) is False:
356356
if type(local_results_files) == str:
357357
local_results_file = local_results_files
358358
remote_results_file = remote_results_files
@@ -374,9 +374,25 @@ def run_remote_benchmark(
374374
local_results_file,
375375
remote_results_file,
376376
)
377+
else:
378+
logging.info(
379+
"Given the bellow commands list:\n\t{}\nwe've skipped result fetching".format(
380+
commands
381+
)
382+
)
377383
return remote_run_result, stdout, stderr
378384

379385

386+
def is_ycsb_java(commands):
387+
res = False
388+
if len(commands) > 0:
389+
tool = commands[0].split(" ")[0]
390+
if "ycsb" in tool:
391+
if "go-ycsb" not in tool:
392+
res = True
393+
return res
394+
395+
380396
def print_commands_outputs(commands, print_err, res):
381397
bench_stdout = ""
382398
bench_stderr = ""

tests/test_remote_client.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
import yaml
77

88
from redisbench_admin.run.common import prepare_benchmark_parameters
9-
from redisbench_admin.run_remote.remote_client import ann_benchmark_remote_cmds
9+
from redisbench_admin.run_remote.remote_client import (
10+
ann_benchmark_remote_cmds,
11+
is_ycsb_java,
12+
)
1013
from redisbench_admin.utils.benchmark_config import extract_benchmark_tool_settings
1114

1215

@@ -68,3 +71,18 @@ def test_ann_benchmark_remote_cmds():
6871
pkg_path
6972
)
7073
)
74+
75+
76+
def test_is_ycsb_java():
77+
commands = [
78+
"memtier_benchmark -s 10.3.0.117 -p 6379 --hide-histogram --json-out-file /tmp/benchmark-result-search-wildcard-nosorting_2022-07-25-14-01-44.out --test-time 120 -c 32 -t 1 --hide-histogram --command 'FT.SEARCH ycsb * LIMIT 0 0'"
79+
]
80+
assert is_ycsb_java(commands) == False
81+
commands = [
82+
"/tmp/go-ycsb -s 10.3.0.117 -p 6379 --hide-histogram --json-out-file /tmp/benchmark-result-search-wildcard-nosorting_2022-07-25-14-01-44.out --test-time 120 -c 32 -t 1 --hide-histogram --command 'FT.SEARCH ycsb * LIMIT 0 0'"
83+
]
84+
assert is_ycsb_java(commands) == False
85+
commands = [
86+
"/tmp/abacac/java/etc/adad/a/a/ycsb -s 10.3.0.117 -p 6379 --hide-histogram --json-out-file /tmp/benchmark-result-search-wildcard-nosorting_2022-07-25-14-01-44.out --test-time 120 -c 32 -t 1 --hide-histogram --command 'FT.SEARCH ycsb * LIMIT 0 0'"
87+
]
88+
assert is_ycsb_java(commands) == True

0 commit comments

Comments
 (0)