Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.6.23"
version = "0.6.24"
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
9 changes: 9 additions & 0 deletions redisbench_admin/run/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
SETUP = os.getenv("SETUP", "")
S3_BUCKET_NAME = os.getenv("S3_BUCKET_NAME", "ci.benchmarks.redislabs")
PUSH_S3 = bool(os.getenv("PUSH_S3", False))
FAIL_FAST = bool(os.getenv("FAIL_FAST", False))
PROFILERS_DSO = os.getenv("PROFILERS_DSO", None)
PROFILERS_ENABLED = bool(int(os.getenv("PROFILE", 0)))
PROFILERS = os.getenv("PROFILERS", PROFILERS_DEFAULT)
Expand All @@ -41,6 +42,14 @@ def common_run_args(parser):
action="store_true",
help="Keep environment and topology up after benchmark.",
)
parser.add_argument(
"--fail_fast",
required=False,
default=FAIL_FAST,
action="store_true",
help="In case of failure exit immediately. Otherwise run all other tests and then exit on error.",
)

parser.add_argument(
"--dbdir_folder",
type=str,
Expand Down
1 change: 1 addition & 0 deletions redisbench_admin/run_local/run_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ def run_local_command_logic(args, project_name, project_version):
)

(
_,
benchmark_definitions,
default_metrics,
_,
Expand Down
9 changes: 9 additions & 0 deletions redisbench_admin/run_remote/run_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ def run_remote_command_logic(args, project_name, project_version):
ssh_pem_check(EC2_PRIVATE_PEM, private_key)

(
benchmark_defs_result,
benchmark_definitions,
default_metrics,
exporter_timemetric_path,
Expand All @@ -130,6 +131,14 @@ def run_remote_command_logic(args, project_name, project_version):
) = prepare_benchmark_definitions(args)

return_code = 0
if benchmark_defs_result is False:
return_code = 1
if args.fail_fast:
logging.critical(
"Detected errors while preparing benchmark definitions. Exiting right away!"
)
exit(1)

remote_envs = {}
dirname = "."
(
Expand Down
9 changes: 6 additions & 3 deletions redisbench_admin/utils/benchmark_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def parse_exporter_timemetric(metric_path: str, results_dict: dict):

def prepare_benchmark_definitions(args):
benchmark_definitions = {}
result = True
defaults_filename, files = get_testfiles_to_process(args)

(
Expand All @@ -61,13 +62,15 @@ def prepare_benchmark_definitions(args):
clusterconfig,
) = get_defaults(defaults_filename)
for usecase_filename in files:
with open(usecase_filename, "r") as stream:
result, benchmark_config, test_name = get_final_benchmark_config(
with open(usecase_filename, "r", encoding="utf8") as stream:
test_result, benchmark_config, test_name = get_final_benchmark_config(
default_kpis, stream, usecase_filename
)
if result:
result &= test_result
if test_result:
benchmark_definitions[test_name] = benchmark_config
return (
result,
benchmark_definitions,
default_metrics,
exporter_timemetric_path,
Expand Down