diff --git a/pyproject.toml b/pyproject.toml index 9cbebbe..f216e10 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "redisbench-admin" -version = "0.1.28" +version = "0.1.29" description = "Redis benchmark run helper. A wrapper around Redis and Redis Modules benchmark tools ( ftsb_redisearch, memtier_benchmark, redis-benchmark, aibench, etc... )." authors = ["filipecosta90 "] readme = "README.md" diff --git a/redisbench_admin/run/args.py b/redisbench_admin/run/args.py index 34553f3..57e45fe 100644 --- a/redisbench_admin/run/args.py +++ b/redisbench_admin/run/args.py @@ -18,8 +18,10 @@ def create_run_arguments(parser): help='number of database shards used in the deployment') parser.add_argument('--pipeline', type=int, default=1, help='pipeline requests to Redis') - parser.add_argument('--skip-teardown', default=False, action='store_true', - help="If enabled will skip any teardown steps.") + parser.add_argument('--skip-teardown-commands', default=False, action='store_true', + help="If enabled will skip any teardown commands.") + parser.add_argument('--skip-setup-commands', default=False, action='store_true', + help="If enabled will skip any setup commands.") parser.add_argument('--continue-on-error', default=False, action='store_true', help="If enabled will continue on Redis ERR replies and only print the message.") parser.add_argument('--cluster-mode', default=False, action='store_true', help="Run client in cluster mode") diff --git a/redisbench_admin/run/run.py b/redisbench_admin/run/run.py index fe3932e..d3d2f67 100644 --- a/redisbench_admin/run/run.py +++ b/redisbench_admin/run/run.py @@ -32,7 +32,8 @@ def run_command_logic(args): requests = args.requests continue_on_error = args.continue_on_error run_only_steps = None - skip_teardown = args.skip_teardown + skip_setup = args.skip_setup_commands + skip_teardown = args.skip_teardown_commands if args.run_only_steps != "": run_only_steps = args.run_only_steps.split(",") @@ -128,7 +129,10 @@ def run_command_logic(args): progress = tqdm(unit="bench steps", total=total_steps) for repetition in range(1, args.repetitions + 1): if benchmark_repetitions_require_teardown is True or repetition == 1: - aux_client = run_setup_commands(args, "setup", benchmark_config["setup"]["commands"], oss_cluster_mode) + if skip_setup is False: + aux_client = run_setup_commands(args, "setup", benchmark_config["setup"]["commands"], oss_cluster_mode) + else: + print("Implicitly skipping setup commands due to --skip-setup-commands flag") if "setup" in run_stages_inputs: run_setup_step = True if run_only_steps is not None and "setup" not in run_only_steps: @@ -169,7 +173,7 @@ def run_command_logic(args): print("Running tear down steps...") run_setup_commands(args, "tear down", benchmark_config["teardown"]["commands"], oss_cluster_mode) else: - print("Implicitly skipping teardown step due to --skip-teardown flag") + print("Implicitly skipping teardown commands due to --skip-teardown-commands flag") progress.update() end_time = dt.datetime.now()