Skip to content

Commit 9f2f709

Browse files
Fixed unecessary results generation from skipped tests (#26)
* [fix] Fixed unecessary results generation from skipped tests * [version] Bumping version from 0.1.27 to 0.1.28
1 parent ab625f2 commit 9f2f709

File tree

2 files changed

+20
-19
lines changed

2 files changed

+20
-19
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "redisbench-admin"
3-
version = "0.1.27"
3+
version = "0.1.28"
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"

redisbench_admin/run/run.py

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -181,24 +181,25 @@ def run_command_logic(args):
181181

182182
benchmark_output_dict["results-comparison"] = {}
183183
for step in run_stages:
184-
for run_name, result_run in benchmark_output_dict[step].items():
185-
step_df_dict[step]["df_dict"]["run-name"].append(run_name)
186-
for pos, metric_json_path in enumerate(step_df_dict[step]["metric_json_path"]):
187-
metric_name = step_df_dict[step]["sorting_metric_names"][pos]
188-
metric_value = None
189-
try:
190-
metric_value = findJsonPath(metric_json_path, result_run)
191-
except KeyError:
192-
print(
193-
"Error retrieving {} metric from JSON PATH {} on file {}".format(metric_name, metric_json_path,
194-
run_name))
195-
pass
196-
step_df_dict[step]["df_dict"][metric_name].append(metric_value)
197-
resultsDataFrame = pd.DataFrame(step_df_dict[step]["df_dict"])
198-
resultsDataFrame.sort_values(step_df_dict[step]["sorting_metric_names"],
199-
ascending=step_df_dict[step]["sorting_metric_sorting_direction"], inplace=True)
200-
benchmark_output_dict["key-results"][step] = from_resultsDF_to_key_results_dict(resultsDataFrame, step,
201-
step_df_dict)
184+
if run_only_steps is not None and step not in run_only_steps:
185+
for run_name, result_run in benchmark_output_dict[step].items():
186+
step_df_dict[step]["df_dict"]["run-name"].append(run_name)
187+
for pos, metric_json_path in enumerate(step_df_dict[step]["metric_json_path"]):
188+
metric_name = step_df_dict[step]["sorting_metric_names"][pos]
189+
metric_value = None
190+
try:
191+
metric_value = findJsonPath(metric_json_path, result_run)
192+
except KeyError:
193+
print(
194+
"Error retrieving {} metric from JSON PATH {} on file {}".format(metric_name, metric_json_path,
195+
run_name))
196+
pass
197+
step_df_dict[step]["df_dict"][metric_name].append(metric_value)
198+
resultsDataFrame = pd.DataFrame(step_df_dict[step]["df_dict"])
199+
resultsDataFrame.sort_values(step_df_dict[step]["sorting_metric_names"],
200+
ascending=step_df_dict[step]["sorting_metric_sorting_direction"], inplace=True)
201+
benchmark_output_dict["key-results"][step] = from_resultsDF_to_key_results_dict(resultsDataFrame, step,
202+
step_df_dict)
202203
#####################
203204
# Run Info Metadata #
204205
#####################

0 commit comments

Comments
 (0)