Skip to content

Commit

Permalink
Checkout runner.py from main
Browse files Browse the repository at this point in the history
  • Loading branch information
mpozniak95 committed Dec 12, 2024
1 parent d104fe1 commit 745c933
Showing 1 changed file with 16 additions and 51 deletions.
67 changes: 16 additions & 51 deletions redis_benchmarks_specification/__runner__/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,30 +204,6 @@ def run_client_runner_logic(args, project_name, project_name_suffix, project_ver
)


def prepare_vector_db_benchmark_parameters(
clientconfig, full_benchmark_path, port, server, password, client_mnt_point
):
benchmark_command = []
# if port is not None:
# benchmark_command.extend(["REDIS_PORT={}".format(port)])
# if password is not None:
# benchmark_command.extend(["REDIS_AUTH={}".format(password)])
benchmark_command.extend(
[
full_benchmark_path,
"--host",
f"{server}",
]
)
benchmark_command.extend(["--engines", clientconfig.get("engines", "redis-test")])
benchmark_command.extend(
["--datasets", clientconfig.get("datasets", "glove-100-angular")]
)
benchmark_command_str = " ".join(benchmark_command)
benchmark_command_str = f"bash -c 'ITERATIONS=1 {benchmark_command_str} && mv /code/results {client_mnt_point}.'"
return None, benchmark_command_str


def prepare_memtier_benchmark_parameters(
clientconfig,
full_benchmark_path,
Expand Down Expand Up @@ -723,7 +699,22 @@ def delete_temporary_files(
)
arbitrary_command = False

if "memtier_benchmark" in benchmark_tool:
if "memtier_benchmark" not in benchmark_tool:
# prepare the benchmark command
(
benchmark_command,
benchmark_command_str,
) = prepare_benchmark_parameters(
benchmark_config,
full_benchmark_path,
port,
host,
local_benchmark_output_filename,
False,
benchmark_tool_workdir,
False,
)
else:
(
_,
benchmark_command_str,
Expand All @@ -745,32 +736,6 @@ def delete_temporary_files(
override_memtier_test_time,
override_test_runs,
)
elif "vector_db_benchmark" in benchmark_tool:
(
_,
benchmark_command_str,
) = prepare_vector_db_benchmark_parameters(
benchmark_config["clientconfig"],
full_benchmark_path,
port,
host,
password,
)
else:
# prepare the benchmark command
(
benchmark_command,
benchmark_command_str,
) = prepare_benchmark_parameters(
benchmark_config,
full_benchmark_path,
port,
host,
local_benchmark_output_filename,
False,
benchmark_tool_workdir,
False,
)

if (
arbitrary_command
Expand Down

0 comments on commit 745c933

Please sign in to comment.