Skip to content

Commit dd0f769

Browse files
Added hability to select benchmark by glob pattern (#300)
1 parent a1ecbdf commit dd0f769

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-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 = "redisbench-admin"
3-
version = "0.7.1"
3+
version = "0.7.2"
44
description = "Redis benchmark run helper. A wrapper around Redis and Redis Modules benchmark tools ( ftsb_redisearch, memtier_benchmark, redis-benchmark, aibench, etc... )."
55
authors = ["filipecosta90 <[email protected]>","Redis Performance Group <[email protected]>"]
66
readme = "README.md"

redisbench_admin/run/args.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
TRIGGERING_ENV = os.getenv("TRIGGERING_ENV", DEFAULT_TRIGGERING_ENV)
2424
ENV = os.getenv("ENV", "oss-standalone,oss-cluster")
2525
SETUP = os.getenv("SETUP", "")
26+
BENCHMARK_GLOB = os.getenv("BENCHMARK_GLOB", "*.yml")
2627
S3_BUCKET_NAME = os.getenv("S3_BUCKET_NAME", "ci.benchmarks.redislabs")
2728
PUSH_S3 = bool(os.getenv("PUSH_S3", False))
2829
FAIL_FAST = bool(os.getenv("FAIL_FAST", False))
@@ -71,6 +72,13 @@ def common_run_args(parser):
7172
default="",
7273
help="specify a test to run. By default will run all of them.",
7374
)
75+
parser.add_argument(
76+
"--test-glob",
77+
type=str,
78+
default=BENCHMARK_GLOB,
79+
help="specify a test glob pattern to use on the tests directory. by default uses *.yml. If --test is defined this options has no effect.",
80+
)
81+
7482
parser.add_argument(
7583
"--defaults_filename",
7684
type=str,

redisbench_admin/utils/benchmark_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ def min_ver_check(
444444
def get_testfiles_to_process(args):
445445
defaults_filename = args.defaults_filename
446446
if args.test == "":
447-
files = pathlib.Path().glob("*.yml")
447+
files = pathlib.Path().glob(args.test_glob)
448448
files = [str(x) for x in files]
449449
if defaults_filename in files:
450450
files.remove(defaults_filename)

0 commit comments

Comments
 (0)