Skip to content

Commit 0277988

Browse files
Added setup agnostic cli benchmark runner (solely client): redis-benchmarks-spec-client-runner (#70)
* [wip] WIP for cli benchmark runner (solely client) * Bumping version from 0.1.18 to 0.1.19
1 parent 0438733 commit 0277988

File tree

7 files changed

+579
-1
lines changed

7 files changed

+579
-1
lines changed

pyproject.toml

Lines changed: 2 additions & 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.1.18"
3+
version = "0.1.19"
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"
@@ -43,6 +43,7 @@ build-backend = "poetry.core.masonry.api"
4343
[tool.poetry.scripts]
4444
redis-benchmarks-spec-api = "redis_benchmarks_specification.__api__.api:main"
4545
redis-benchmarks-spec-builder = "redis_benchmarks_specification.__builder__.builder:main"
46+
redis-benchmarks-spec-client-runner = "redis_benchmarks_specification.__runner__.runner:main"
4647
redis-benchmarks-spec-sc-coordinator = "redis_benchmarks_specification.__self_contained_coordinator__.self_contained_coordinator:main"
4748
redis-benchmarks-spec-cli = "redis_benchmarks_specification.__cli__.cli:main"
4849
redis-benchmarks-spec-watchdog = "redis_benchmarks_specification.__watchdog__.watchdog:main"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Apache 2 License
2+
#
3+
# Copyright (c) 2021., Redis Labs
4+
# All rights reserved.
5+
#
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
import argparse
2+
3+
from redis_benchmarks_specification.__common__.env import (
4+
SPECS_PATH_TEST_SUITES,
5+
DATASINK_RTS_HOST,
6+
DATASINK_RTS_PORT,
7+
DATASINK_RTS_AUTH,
8+
DATASINK_RTS_USER,
9+
DATASINK_RTS_PUSH,
10+
MACHINE_NAME,
11+
)
12+
13+
14+
def create_client_runner_args(project_name):
15+
parser = argparse.ArgumentParser(
16+
description=project_name,
17+
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
18+
)
19+
parser.add_argument(
20+
"--platform-name",
21+
type=str,
22+
default=MACHINE_NAME,
23+
help="Specify the running platform name. By default it will use the machine name.",
24+
)
25+
parser.add_argument("--triggering_env", type=str, default="ci")
26+
parser.add_argument("--setup_type", type=str, default="oss-standalone")
27+
parser.add_argument("--github_repo", type=str, required=True)
28+
parser.add_argument("--github_org", type=str, required=True)
29+
parser.add_argument("--github_version", type=str, default="NA")
30+
parser.add_argument(
31+
"--logname", type=str, default=None, help="logname to write the logs to"
32+
)
33+
parser.add_argument(
34+
"--test-suites-folder",
35+
type=str,
36+
default=SPECS_PATH_TEST_SUITES,
37+
help="Test suites folder, containing the different test variations",
38+
)
39+
parser.add_argument("--db_server_host", type=str, default="localhost")
40+
parser.add_argument("--db_server_port", type=int, default=6379)
41+
parser.add_argument(
42+
"--datasink_redistimeseries_host", type=str, default=DATASINK_RTS_HOST
43+
)
44+
parser.add_argument(
45+
"--datasink_redistimeseries_port", type=int, default=DATASINK_RTS_PORT
46+
)
47+
parser.add_argument(
48+
"--datasink_redistimeseries_pass", type=str, default=DATASINK_RTS_AUTH
49+
)
50+
parser.add_argument(
51+
"--datasink_redistimeseries_user", type=str, default=DATASINK_RTS_USER
52+
)
53+
parser.add_argument(
54+
"--datasink_push_results_redistimeseries",
55+
default=DATASINK_RTS_PUSH,
56+
action="store_true",
57+
help="uploads the results to RedisTimeSeries. Proper credentials are required",
58+
)
59+
parser.add_argument(
60+
"--flushall_on_every_test_end",
61+
default=True,
62+
action="store_true",
63+
help="At the end of every test send a FLUSHALL",
64+
)
65+
return parser

0 commit comments

Comments
 (0)