Skip to content

Commit feff069

Browse files
author
Martin Dimitrov
committed
Re-order --preserve_temporary_client_dirs --client_aggregated_results_folder so that we can create an aggregated folder and still delete the temp files after. In addition, delete temp JSON files created by redis-benchmark (and not by memtier-benchmark)
1 parent 90733b3 commit feff069

File tree

1 file changed

+17
-11
lines changed
  • redis_benchmarks_specification/__runner__

1 file changed

+17
-11
lines changed

redis_benchmarks_specification/__runner__/runner.py

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -506,17 +506,6 @@ def process_self_contained_coordinator_stream(
506506
)
507507
pass
508508

509-
if preserve_temporary_client_dirs is True:
510-
logging.info(
511-
"Preserving temporary client dir {}".format(
512-
temporary_dir_client
513-
)
514-
)
515-
else:
516-
logging.info(
517-
"Removing temporary client dir {}".format(temporary_dir_client)
518-
)
519-
shutil.rmtree(temporary_dir_client, ignore_errors=True)
520509
if client_aggregated_results_folder != "":
521510
os.makedirs(client_aggregated_results_folder, exist_ok=True)
522511
dest_fpath = "{}/{}".format(
@@ -531,6 +520,23 @@ def process_self_contained_coordinator_stream(
531520
shutil.copy(full_result_path, dest_fpath)
532521
overall_result &= test_result
533522

523+
if preserve_temporary_client_dirs is True:
524+
logging.info(
525+
"Preserving temporary client dir {}".format(
526+
temporary_dir_client
527+
)
528+
)
529+
else:
530+
if "redis-benchmark" in benchmark_tool:
531+
os.remove(full_result_path)
532+
logging.info(
533+
"Removing temporary JSON file".format(full_result_path)
534+
)
535+
shutil.rmtree(temporary_dir_client, ignore_errors=True)
536+
logging.info(
537+
"Removing temporary client dir {}".format(temporary_dir_client)
538+
)
539+
534540
table_name = "Results for entire test-suite".format(test_name)
535541
results_matrix_headers = [
536542
"Test Name",

0 commit comments

Comments
 (0)