Skip to content

Commit e850fa5

Browse files
Added APPEND/INCRBY/INCRBYFLOAT/SETRANGE benchmarks (#267)
* Enabled running forks source built benchmarks * Fixed server_name Null check * Enabled passing baseline/comparison hash and github_repo to ensure proper data filtering on compare. Removed refs/heads/ usage from builder * skipping cli builder test on ci * Added --baseline-target-branch and --comparison-target-branch to the compare tool * Added GEOPOS and GEOSEARCH WITHCOORD new benchmarks * Included the connection setup benchmark using HELLO * Bumping version from 0.1.218 to 0.1.219 * Added APPEND/INCRBY/INCRBYFLOAT/SETRANGE benchmarks
1 parent 1883f2f commit e850fa5

9 files changed

+153
-5
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "redis-benchmarks-specification"
3-
version = "0.1.219"
3+
version = "0.1.222"
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/__builder__/builder.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -644,11 +644,11 @@ def generate_benchmark_stream_request(
644644
build_stream_fields["git_version"] = git_version
645645
if git_timestamp_ms is not None:
646646
build_stream_fields["git_timestamp_ms"] = git_timestamp_ms
647+
648+
prefix = f"github_org={github_org}/github_repo={github_repo}/git_branch={str(git_branch)}/git_version={str(git_version)}/git_hash={str(git_hash)}"
647649
for artifact in build_artifacts:
648-
bin_key = "zipped:artifacts:{}:{}.zip".format(id, artifact)
649-
bin_artifact = open(
650-
"{}src/{}".format(redis_temporary_dir, artifact), "rb"
651-
).read()
650+
bin_key = f"zipped:artifacts:{prefix}:{id}:{artifact}.zip"
651+
bin_artifact = open(f"{redis_temporary_dir}src/{artifact}", "rb").read()
652652
bin_artifact_len = len(bytes(bin_artifact))
653653
assert bin_artifact_len > 0
654654
conn.set(bin_key, bytes(bin_artifact), ex=REDIS_BINS_EXPIRE_SECS)

redis_benchmarks_specification/__compare__/args.py

+2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ def create_compare_arguments(parser):
4444
)
4545
parser.add_argument("--github_repo", type=str, default="redis")
4646
parser.add_argument("--github_org", type=str, default="redis")
47+
parser.add_argument("--baseline_github_org", type=str, default="")
48+
parser.add_argument("--comparison_github_org", type=str, default="")
4749
parser.add_argument("--triggering_env", type=str, default="ci")
4850
parser.add_argument("--github_token", type=str, default=PERFORMANCE_GH_TOKEN)
4951
parser.add_argument("--pull-request", type=str, default=None, nargs="?", const="")

redis_benchmarks_specification/__compare__/compare.py

+14
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,8 @@ def compare_command_logic(args, project_name, project_version):
256256
comparison_target_branch = args.comparison_target_branch
257257
baseline_github_repo = args.baseline_github_repo
258258
comparison_github_repo = args.comparison_github_repo
259+
baseline_github_org = args.baseline_github_org
260+
comparison_github_org = args.comparison_github_org
259261
baseline_hash = args.baseline_hash
260262
comparison_hash = args.comparison_hash
261263

@@ -324,6 +326,8 @@ def compare_command_logic(args, project_name, project_version):
324326
comparison_github_repo,
325327
baseline_target_branch,
326328
comparison_target_branch,
329+
baseline_github_org,
330+
comparison_github_org,
327331
)
328332
prepare_regression_comment(
329333
auto_approve,
@@ -555,6 +559,8 @@ def compute_regression_table(
555559
comparison_github_repo="redis",
556560
baseline_target_branch=None,
557561
comparison_target_branch=None,
562+
baseline_github_org="redis",
563+
comparison_github_org="redis",
558564
):
559565
START_TIME_NOW_UTC, _, _ = get_start_time_vars()
560566
START_TIME_LAST_MONTH_UTC = START_TIME_NOW_UTC - datetime.timedelta(days=31)
@@ -657,6 +663,8 @@ def compute_regression_table(
657663
running_platform,
658664
baseline_github_repo,
659665
comparison_github_repo,
666+
baseline_github_org,
667+
comparison_github_org,
660668
)
661669
logging.info(
662670
"Printing differential analysis between {} and {}".format(
@@ -909,6 +917,8 @@ def from_rts_to_regression_table(
909917
running_platform=None,
910918
baseline_github_repo="redis",
911919
comparison_github_repo="redis",
920+
baseline_github_org="redis",
921+
comparison_github_org="redis",
912922
):
913923
print_all = print_regressions_only is False and print_improvements_only is False
914924
table_full = []
@@ -942,6 +952,8 @@ def from_rts_to_regression_table(
942952
"github_repo={}".format(baseline_github_repo),
943953
"triggering_env={}".format(tf_triggering_env),
944954
]
955+
if baseline_github_org != "":
956+
filters_baseline.append(f"github_org={baseline_github_org}")
945957
if running_platform is not None:
946958
filters_baseline.append("running_platform={}".format(running_platform))
947959
filters_comparison = [
@@ -952,6 +964,8 @@ def from_rts_to_regression_table(
952964
"github_repo={}".format(comparison_github_repo),
953965
"triggering_env={}".format(tf_triggering_env),
954966
]
967+
if comparison_github_org != "":
968+
filters_baseline.append(f"github_org={comparison_github_org}")
955969
if "hash" not in by_str_baseline:
956970
filters_baseline.append("hash==")
957971
if "hash" not in by_str_comparison:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
version: 0.4
2+
name: memtier_benchmark-1Mkeys-string-append-1-100B
3+
description: Runs memtier_benchmark, for a keyspace length of 1M keys with a data size of 1 Bytes for each key initially. Then we append to the same keys with values ranging from 1 to 100B.
4+
dbconfig:
5+
configuration-parameters:
6+
save: '""'
7+
check:
8+
keyspacelen: 1000000
9+
preload_tool:
10+
run_image: redislabs/memtier_benchmark:edge
11+
tool: memtier_benchmark
12+
arguments: '"--data-size" "1" "--ratio" "1:0" "--key-pattern" "P:P" "-c" "50" "-t" "2" "--hide-histogram" "--key-minimum" "1"'
13+
resources:
14+
requests:
15+
memory: 1g
16+
tested-commands:
17+
- append
18+
redis-topologies:
19+
- oss-standalone
20+
build-variants:
21+
- gcc:8.5.0-amd64-debian-buster-default
22+
- dockerhub
23+
clientconfig:
24+
run_image: redislabs/memtier_benchmark:edge
25+
tool: memtier_benchmark
26+
arguments: --test-time 120 --data-size-range=1-100 --command "APPEND __key__ __data__" --command-key-pattern="R" --key-minimum=1 --key-maximum 1000000 -c 50 -t 4 --hide-histogram
27+
resources:
28+
requests:
29+
cpus: '4'
30+
memory: 2g
31+
32+
tested-groups:
33+
- string
34+
priority: 1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
version: 0.4
2+
name: memtier_benchmark-1Mkeys-string-incrby
3+
description: Runs memtier_benchmark, for a keyspace length of 1M keys doing incrby of 1.
4+
dbconfig:
5+
configuration-parameters:
6+
save: '""'
7+
resources:
8+
requests:
9+
memory: 1g
10+
tested-groups:
11+
- string
12+
tested-commands:
13+
- incrby
14+
redis-topologies:
15+
- oss-standalone
16+
build-variants:
17+
- gcc:8.5.0-amd64-debian-buster-default
18+
- dockerhub
19+
clientconfig:
20+
run_image: redislabs/memtier_benchmark:edge
21+
tool: memtier_benchmark
22+
arguments: --test-time 120 --command "INCRBY __key__ 1" --command-key-pattern="R" --key-minimum=1 --key-maximum 1000000 -c 50 -t 4 --hide-histogram
23+
resources:
24+
requests:
25+
cpus: '4'
26+
memory: 2g
27+
28+
priority: 21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
version: 0.4
2+
name: memtier_benchmark-1Mkeys-string-incrbyfloat
3+
description: Runs memtier_benchmark, for a keyspace length of 1M keys doing incrby of 0.01.
4+
dbconfig:
5+
configuration-parameters:
6+
save: '""'
7+
resources:
8+
requests:
9+
memory: 1g
10+
tested-groups:
11+
- string
12+
tested-commands:
13+
- incrbyfloat
14+
redis-topologies:
15+
- oss-standalone
16+
build-variants:
17+
- gcc:8.5.0-amd64-debian-buster-default
18+
- dockerhub
19+
clientconfig:
20+
run_image: redislabs/memtier_benchmark:edge
21+
tool: memtier_benchmark
22+
arguments: --test-time 120 --command "INCRBYFLOAT __key__ 0.01" --command-key-pattern="R" --key-minimum=1 --key-maximum 1000000 -c 50 -t 4 --hide-histogram
23+
resources:
24+
requests:
25+
cpus: '4'
26+
memory: 2g
27+
28+
priority: 21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
version: 0.4
2+
name: memtier_benchmark-1Mkeys-string-setrange-100B
3+
description: Runs memtier_benchmark, for a keyspace length of 1M keys with a data size of 100 Bytes for each key.
4+
dbconfig:
5+
configuration-parameters:
6+
save: '""'
7+
check:
8+
keyspacelen: 1000000
9+
preload_tool:
10+
run_image: redislabs/memtier_benchmark:edge
11+
tool: memtier_benchmark
12+
arguments: '"--data-size" "100" "--ratio" "1:0" "--key-pattern" "P:P" "-c" "50" "-t" "2" "--hide-histogram" "--key-minimum" "1"'
13+
resources:
14+
requests:
15+
memory: 1g
16+
tested-commands:
17+
- setrange
18+
redis-topologies:
19+
- oss-standalone
20+
build-variants:
21+
- gcc:8.5.0-amd64-debian-buster-default
22+
- dockerhub
23+
clientconfig:
24+
run_image: redislabs/memtier_benchmark:edge
25+
tool: memtier_benchmark
26+
arguments: --test-time 120 --data-size-range=1-95 --command "SETRANGE __key__ 5 __data__" --command-key-pattern="R" --key-minimum=1 --key-maximum 1000000 -c 50 -t 4 --hide-histogram
27+
resources:
28+
requests:
29+
cpus: '4'
30+
memory: 2g
31+
32+
tested-groups:
33+
- string
34+
priority: 1

redis_benchmarks_specification/test-suites/memtier_benchmark-connection-hello.yml

+8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
version: 0.4
22
name: memtier_benchmark-connection-hello
33
description: 'Runs memtier_benchmark, for no keyspace, benchmarking the connection setup scenario using HELLO command.'
4+
dbconfig:
5+
configuration-parameters:
6+
save: '""'
7+
check:
8+
keyspacelen: 0
9+
resources:
10+
requests:
11+
memory: 1g
412
tested-groups:
513
- connection
614
tested-commands:

0 commit comments

Comments
 (0)