Skip to content

Commit 8a23ac1

Browse files
Added --override-topology to the runner, with a default of oss-standalone only (#329)
1 parent 10df9a5 commit 8a23ac1

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
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 = "redis-benchmarks-specification"
3-
version = "0.2.30"
3+
version = "0.2.31"
44
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."
55
authors = ["filipecosta90 <[email protected]>","Redis Performance Group <[email protected]>"]
66
readme = "Readme.md"

redis_benchmarks_specification/__runner__/args.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,4 +325,10 @@ def create_client_runner_args(project_name):
325325
default=None,
326326
help="Password for HTTP basic authentication to remote profiling endpoint. Optional.",
327327
)
328+
parser.add_argument(
329+
"--override-topology",
330+
type=str,
331+
default="oss-standalone",
332+
help="Override the redis-topologies from the benchmark config and use only the specified topology name instead.",
333+
)
328334
return parser

redis_benchmarks_specification/__runner__/runner.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1554,6 +1554,14 @@ def delete_temporary_files(
15541554
None, None, stream, ""
15551555
)
15561556

1557+
# Use override topology if provided, otherwise use all topologies from config
1558+
if hasattr(args, "override_topology") and args.override_topology:
1559+
benchmark_topologies = [args.override_topology]
1560+
logging.info(f"Using override topology: {args.override_topology}")
1561+
else:
1562+
benchmark_topologies = benchmark_config["redis-topologies"]
1563+
logging.info(f"Running for a total of {len(benchmark_topologies)} topologies: {benchmark_topologies}")
1564+
15571565
# Check if user requested exit via Ctrl+C
15581566
if _exit_requested:
15591567
logging.info(f"Exit requested by user. Skipping test {test_name}.")
@@ -1592,7 +1600,7 @@ def delete_temporary_files(
15921600
)
15931601
)
15941602

1595-
for topology_spec_name in benchmark_config["redis-topologies"]:
1603+
for topology_spec_name in benchmark_topologies:
15961604
test_result = False
15971605
benchmark_tool_global = ""
15981606
full_result_path = None

0 commit comments

Comments
 (0)