Skip to content

Commit 745c933

Browse files
committed
Checkout runner.py from main
1 parent d104fe1 commit 745c933

File tree

1 file changed

+16
-51
lines changed
  • redis_benchmarks_specification/__runner__

1 file changed

+16
-51
lines changed

redis_benchmarks_specification/__runner__/runner.py

Lines changed: 16 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -204,30 +204,6 @@ def run_client_runner_logic(args, project_name, project_name_suffix, project_ver
204204
)
205205

206206

207-
def prepare_vector_db_benchmark_parameters(
208-
clientconfig, full_benchmark_path, port, server, password, client_mnt_point
209-
):
210-
benchmark_command = []
211-
# if port is not None:
212-
# benchmark_command.extend(["REDIS_PORT={}".format(port)])
213-
# if password is not None:
214-
# benchmark_command.extend(["REDIS_AUTH={}".format(password)])
215-
benchmark_command.extend(
216-
[
217-
full_benchmark_path,
218-
"--host",
219-
f"{server}",
220-
]
221-
)
222-
benchmark_command.extend(["--engines", clientconfig.get("engines", "redis-test")])
223-
benchmark_command.extend(
224-
["--datasets", clientconfig.get("datasets", "glove-100-angular")]
225-
)
226-
benchmark_command_str = " ".join(benchmark_command)
227-
benchmark_command_str = f"bash -c 'ITERATIONS=1 {benchmark_command_str} && mv /code/results {client_mnt_point}.'"
228-
return None, benchmark_command_str
229-
230-
231207
def prepare_memtier_benchmark_parameters(
232208
clientconfig,
233209
full_benchmark_path,
@@ -723,7 +699,22 @@ def delete_temporary_files(
723699
)
724700
arbitrary_command = False
725701

726-
if "memtier_benchmark" in benchmark_tool:
702+
if "memtier_benchmark" not in benchmark_tool:
703+
# prepare the benchmark command
704+
(
705+
benchmark_command,
706+
benchmark_command_str,
707+
) = prepare_benchmark_parameters(
708+
benchmark_config,
709+
full_benchmark_path,
710+
port,
711+
host,
712+
local_benchmark_output_filename,
713+
False,
714+
benchmark_tool_workdir,
715+
False,
716+
)
717+
else:
727718
(
728719
_,
729720
benchmark_command_str,
@@ -745,32 +736,6 @@ def delete_temporary_files(
745736
override_memtier_test_time,
746737
override_test_runs,
747738
)
748-
elif "vector_db_benchmark" in benchmark_tool:
749-
(
750-
_,
751-
benchmark_command_str,
752-
) = prepare_vector_db_benchmark_parameters(
753-
benchmark_config["clientconfig"],
754-
full_benchmark_path,
755-
port,
756-
host,
757-
password,
758-
)
759-
else:
760-
# prepare the benchmark command
761-
(
762-
benchmark_command,
763-
benchmark_command_str,
764-
) = prepare_benchmark_parameters(
765-
benchmark_config,
766-
full_benchmark_path,
767-
port,
768-
host,
769-
local_benchmark_output_filename,
770-
False,
771-
benchmark_tool_workdir,
772-
False,
773-
)
774739

775740
if (
776741
arbitrary_command

0 commit comments

Comments
 (0)