From 8b6a897f3c24a3924f32a11964625df5fa01821c Mon Sep 17 00:00:00 2001 From: fcosta_oliveira Date: Mon, 27 Oct 2025 14:57:14 +0000 Subject: [PATCH] Added --override-topology to the runner, with a default of oss-standalone only --- pyproject.toml | 2 +- redis_benchmarks_specification/__runner__/args.py | 6 ++++++ redis_benchmarks_specification/__runner__/runner.py | 10 +++++++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a655ddc..35e3cab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "redis-benchmarks-specification" -version = "0.2.30" +version = "0.2.31" description = "The Redis benchmarks specification describes the cross-language/tools requirements and expectations to foster performance and observability standards around redis related technologies. Members from both industry and academia, including organizations and individuals are encouraged to contribute." authors = ["filipecosta90 ","Redis Performance Group "] readme = "Readme.md" diff --git a/redis_benchmarks_specification/__runner__/args.py b/redis_benchmarks_specification/__runner__/args.py index 930bfea..88f6389 100644 --- a/redis_benchmarks_specification/__runner__/args.py +++ b/redis_benchmarks_specification/__runner__/args.py @@ -325,4 +325,10 @@ def create_client_runner_args(project_name): default=None, help="Password for HTTP basic authentication to remote profiling endpoint. Optional.", ) + parser.add_argument( + "--override-topology", + type=str, + default="oss-standalone", + help="Override the redis-topologies from the benchmark config and use only the specified topology name instead.", + ) return parser diff --git a/redis_benchmarks_specification/__runner__/runner.py b/redis_benchmarks_specification/__runner__/runner.py index 775d490..4b2cd3b 100644 --- a/redis_benchmarks_specification/__runner__/runner.py +++ b/redis_benchmarks_specification/__runner__/runner.py @@ -1554,6 +1554,14 @@ def delete_temporary_files( None, None, stream, "" ) + # Use override topology if provided, otherwise use all topologies from config + if hasattr(args, "override_topology") and args.override_topology: + benchmark_topologies = [args.override_topology] + logging.info(f"Using override topology: {args.override_topology}") + else: + benchmark_topologies = benchmark_config["redis-topologies"] + logging.info(f"Running for a total of {len(benchmark_topologies)} topologies: {benchmark_topologies}") + # Check if user requested exit via Ctrl+C if _exit_requested: logging.info(f"Exit requested by user. Skipping test {test_name}.") @@ -1592,7 +1600,7 @@ def delete_temporary_files( ) ) - for topology_spec_name in benchmark_config["redis-topologies"]: + for topology_spec_name in benchmark_topologies: test_result = False benchmark_tool_global = "" full_result_path = None