Skip to content

Commit

Permalink
Enabled fail-fast on run-remote (#325)
Browse files Browse the repository at this point in the history
* Fixed cat of log on error situation

* Enabled fail-fast on run-remote
  • Loading branch information
filipecosta90 authored Mar 16, 2022
1 parent bae2055 commit 3f2aa88
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "redisbench-admin"
version = "0.7.19"
version = "0.7.20"
description = "Redis benchmark run helper. A wrapper around Redis and Redis Modules benchmark tools ( ftsb_redisearch, memtier_benchmark, redis-benchmark, aibench, etc... )."
authors = ["filipecosta90 <filipecosta.90@gmail.com>","Redis Performance Group <performance@redis.com>"]
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion redisbench_admin/run_remote/remote_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ def db_error_artifacts(
username,
private_key,
[
"zip -r {} {}".format(remote_zipfile, temporary_dir),
"zip -r {} {}/*".format(remote_zipfile, temporary_dir),
],
db_ssh_port,
)
Expand Down
35 changes: 35 additions & 0 deletions redisbench_admin/run_remote/run_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,34 @@ def run_remote_command_logic(args, project_name, project_version):
overall_tables = {}

for benchmark_type, bench_by_dataset_map in benchmark_runs_plan.items():
if return_code != 0 and args.fail_fast:
logging.warning(
"Given you've selected fail fast skipping benchmark_type {}".format(
benchmark_type
)
)
continue
logging.info("Running benchmarks of type {}.".format(benchmark_type))
for (
dataset_name,
bench_by_dataset_and_setup_map,
) in bench_by_dataset_map.items():
if return_code != 0 and args.fail_fast:
logging.warning(
"Given you've selected fail fast skipping dataset {}".format(
dataset_name
)
)
continue
logging.info("Running benchmarks for dataset {}.".format(dataset_name))
for setup_name, setup_details in bench_by_dataset_and_setup_map.items():
if return_code != 0 and args.fail_fast:
logging.warning(
"Given you've selected fail fast skipping setup {}".format(
setup_name
)
)
continue

setup_settings = setup_details["setup_settings"]
benchmarks_map = setup_details["benchmarks"]
Expand All @@ -228,13 +249,27 @@ def run_remote_command_logic(args, project_name, project_version):
overall_tables[setup_name] = {}

for test_name, benchmark_config in benchmarks_map.items():
if return_code != 0 and args.fail_fast:
logging.warning(
"Given you've selected fail fast skipping test {}".format(
test_name
)
)
continue
metadata_tags = get_metadata_tags(benchmark_config)
logging.info(
"Including the extra metadata tags into this test generated time-series: {}".format(
metadata_tags
)
)
for repetition in range(1, BENCHMARK_REPETITIONS + 1):
if return_code != 0 and args.fail_fast:
logging.warning(
"Given you've selected fail fast skipping repetition {}".format(
repetition
)
)
continue
remote_perf = None
logging.info(
"Repetition {} of {}. Running test {}".format(
Expand Down

0 comments on commit 3f2aa88

Please sign in to comment.