Skip to content

Commit 3589376

Browse files
Added support for multi-exec (#176)
1 parent e5938dd commit 3589376

File tree

5 files changed

+59
-3
lines changed

5 files changed

+59
-3
lines changed

dump.rdb

-153 Bytes
Binary file not shown.

redis_benchmarks_specification/__cli__/args.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
START_TIME_NOW_UTC, _, _ = get_start_time_vars()
2121
START_TIME_LAST_YEAR_UTC = START_TIME_NOW_UTC - datetime.timedelta(days=7)
22+
CLI_TOOL_STATS = "stats"
23+
CLI_TOOL_TRIGGER = "trigger"
2224

2325

2426
def spec_cli_args(parser):
@@ -31,6 +33,12 @@ def spec_cli_args(parser):
3133
parser.add_argument("--redis_host", type=str, default=GH_REDIS_SERVER_HOST)
3234
parser.add_argument("--branch", type=str, default="unstable")
3335
parser.add_argument("--commandstats-csv", type=str, default="")
36+
parser.add_argument(
37+
"--commandstats-csv-include-modules",
38+
default=False,
39+
action="store_true",
40+
help="Include modules statistics on commandstats.",
41+
)
3442
parser.add_argument("--summary-csv", type=str, default="")
3543
parser.add_argument("--commands-json-file", type=str, default="./commands.json")
3644
parser.add_argument("--groups-json-file", type=str, default="./groups.json")
@@ -52,7 +60,14 @@ def spec_cli_args(parser):
5260
action="store_true",
5361
help="Push test stats to redis.",
5462
)
55-
parser.add_argument("--tool", type=str, default="trigger")
63+
parser.add_argument(
64+
"--tool",
65+
type=str,
66+
default=CLI_TOOL_TRIGGER,
67+
help="subtool to use. One of '{}' ".format(
68+
",".join([CLI_TOOL_STATS, CLI_TOOL_TRIGGER])
69+
),
70+
)
5671
parser.add_argument("--gh_token", type=str, default=GH_TOKEN)
5772
parser.add_argument("--redis_port", type=int, default=GH_REDIS_SERVER_PORT)
5873
parser.add_argument("--redis_pass", type=str, default=GH_REDIS_SERVER_AUTH)

redis_benchmarks_specification/__cli__/stats.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def generate_stats_cli_command_logic(args, project_name, project_version):
2222
)
2323
)
2424
commands_json_file = os.path.abspath(args.commands_json_file)
25+
include_modules = args.commandstats_csv_include_modules
2526
logging.info("Reading commands.json file from {}".format(commands_json_file))
2627
commands_json = {}
2728
tracked_commands_json = {}
@@ -202,7 +203,7 @@ def generate_stats_cli_command_logic(args, project_name, project_version):
202203

203204
if cmdstat in tracked_commands_json:
204205
tracked = True
205-
if module is False:
206+
if module is False or include_modules:
206207
row = [cmdstat, group, count, tracked, deprecated]
207208
rows.append(row)
208209

redis_benchmarks_specification/__runner__/runner.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,8 @@ def prepare_memtier_benchmark_parameters(
196196
if resp_version:
197197
tool = clientconfig["tool"]
198198
if tool == "memtier_benchmark":
199-
benchmark_command.extend(["--resp", resp_version])
199+
if resp_version == "3":
200+
benchmark_command.extend(["--protocol", "resp{}".format(resp_version)])
200201
elif tool == "redis-benchmark":
201202
if resp_version == "3":
202203
benchmark_command.append("-3")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
version: 0.4
2+
name: memtier_benchmark-1Mkeys-hash-transactions-multi-exec-pipeline-20
3+
description: Runs memtier_benchmark, for a keyspace length of 1M keys with a data size of 100 Bytes for each key, focusing on the MULTI EXEC scenario.
4+
tested-groups:
5+
- transactions
6+
- hash
7+
tested-commands:
8+
- multi
9+
- exec
10+
- hsetnx
11+
- hexists
12+
- hget
13+
- hdel
14+
redis-topologies:
15+
- oss-standalone
16+
build-variants:
17+
- gcc:8.5.0-amd64-debian-buster-default
18+
dbconfig:
19+
configuration-parameters:
20+
save: '""'
21+
clientconfig:
22+
run_image: redislabs/memtier_benchmark:edge
23+
tool: memtier_benchmark
24+
arguments: '"--data-size" "100" --command=MULTI --command-key-pattern=S --command="HSETNX __key__ __key__ __data__" --command-key-pattern=S --command="HEXISTS __key__ __key__" --command-key-pattern=S --command="HGET __key__ __key__" --command-key-pattern=S --command="HDEL __key__ __key__" --command-key-pattern=S --command=EXEC --command-key-pattern=S --pipeline=20 -c 50 -t 2 --hide-histogram --test-time 300'
25+
resources:
26+
requests:
27+
cpus: '3'
28+
memory: 2g
29+
exporter:
30+
redistimeseries:
31+
break_by:
32+
- version
33+
- commit
34+
timemetric: $."ALL STATS".Runtime."Start time"
35+
metrics:
36+
- $."ALL STATS".Totals."Ops/sec"
37+
- $."ALL STATS".Totals."Latency"
38+
- $."ALL STATS".Totals."Misses/sec"
39+
- $."ALL STATS".Totals."Percentile Latencies"."p50.00"

0 commit comments

Comments
 (0)