Skip to content

Commit d569723

Browse files
Enforcing keyspace length check and checking for datasets within scc (#136)
* Enforcing keyspace length check and checking for datasets within scc * Fixed flake8 related issues after additions * Kickoff GEO commands benchmark tracking * Added geodist geohash and geopos benchmarks * reusing get_branch_version_from_test_details across builder and scc * geodist geohash geopos geosearch pipeline 10 variants
1 parent e02f265 commit d569723

16 files changed

+392
-40
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.1.59"
3+
version = "0.1.60"
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

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
get_build_config,
1414
get_build_config_metadata,
1515
)
16+
from redis_benchmarks_specification.__common__.builder_schema import (
17+
get_branch_version_from_test_details,
18+
)
1619
from redis_benchmarks_specification.__common__.env import (
1720
STREAM_KEYNAME_GH_EVENTS_COMMIT,
1821
GH_REDIS_SERVER_HOST,
@@ -201,16 +204,9 @@ def builder_process_stream(
201204
)
202205
)
203206
buffer = conn.get(binary_zip_key)
204-
git_branch = None
205-
git_version = None
206-
if b"git_branch" in testDetails:
207-
git_branch = testDetails[b"git_branch"]
208-
if b"ref_label" in testDetails:
209-
git_branch = testDetails[b"ref_label"]
210-
if b"git_version" in testDetails:
211-
git_version = testDetails[b"git_version"]
212207
git_timestamp_ms = None
213208
use_git_timestamp = False
209+
git_branch, git_version = get_branch_version_from_test_details(testDetails)
214210
if b"use_git_timestamp" in testDetails:
215211
use_git_timestamp = bool(testDetails[b"use_git_timestamp"])
216212
if b"git_timestamp_ms" in testDetails:

redis_benchmarks_specification/__common__/builder_schema.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,3 +146,25 @@ def request_build_from_commit_info(
146146
id = conn.xadd(STREAM_KEYNAME_GH_EVENTS_COMMIT.encode(), fields)
147147
reply_fields["id"] = id
148148
return result, reply_fields, error_msg
149+
150+
151+
def get_branch_version_from_test_details(testDetails):
152+
git_branch = None
153+
git_version = None
154+
if b"git_branch" in testDetails:
155+
git_branch = testDetails[b"git_branch"]
156+
if b"ref_label" in testDetails:
157+
git_branch = testDetails[b"ref_label"]
158+
if b"git_version" in testDetails:
159+
git_version = testDetails[b"git_version"]
160+
if git_branch is not None:
161+
# remove event prefix
162+
if type(git_branch) == bytes:
163+
git_branch = git_branch.decode()
164+
if git_branch.startswith("/refs/heads/"):
165+
git_branch = git_branch.replace("/refs/heads/", "")
166+
if git_version is not None:
167+
if type(git_version) == bytes:
168+
git_version = git_version.decode()
169+
170+
return git_branch, git_version

redis_benchmarks_specification/__self_contained_coordinator__/build_info.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import json
22
import logging
33

4+
from redis_benchmarks_specification.__common__.builder_schema import (
5+
get_branch_version_from_test_details,
6+
)
7+
48

59
def extract_build_info_from_streamdata(testDetails):
610
use_git_timestamp = False
711
git_timestamp_ms = None
8-
git_version = None
9-
git_branch = None
1012
metadata = None
1113
build_variant_name = None
1214
fields = [fieldname.decode() for fieldname in testDetails.keys()]
@@ -20,14 +22,7 @@ def extract_build_info_from_streamdata(testDetails):
2022
build_variant_name = testDetails[b"id"]
2123
if type(build_variant_name) == bytes:
2224
build_variant_name = build_variant_name.decode()
23-
if b"git_branch" in testDetails:
24-
git_branch = testDetails[b"git_branch"]
25-
if type(git_branch) == bytes:
26-
git_branch = git_branch.decode()
27-
if b"git_version" in testDetails:
28-
git_version = testDetails[b"git_version"]
29-
if type(git_version) == bytes:
30-
git_version = git_version.decode()
25+
git_branch, git_version = get_branch_version_from_test_details(testDetails)
3126
if type(git_hash) == bytes:
3227
git_hash = git_hash.decode()
3328
logging.info("Received commit hash specifier {}.".format(git_hash))

redis_benchmarks_specification/__self_contained_coordinator__/runners.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88

99
import redis
1010
from redisbench_admin.environments.oss_cluster import generate_cluster_redis_server_args
11+
12+
from redisbench_admin.utils.local import check_dataset_local_requirements
13+
14+
from redisbench_admin.run.common import (
15+
dbconfig_keyspacelen_check,
16+
)
17+
1118
from redisbench_admin.profilers.profilers_local import (
1219
local_profilers_platform_checks,
1320
profilers_start_if_required,
@@ -211,6 +218,23 @@ def process_self_contained_coordinator_stream(
211218
restore_build_artifacts_from_test_details(
212219
build_artifacts, conn, temporary_dir, testDetails
213220
)
221+
222+
logging.info("Checking if there is a dataset requirement")
223+
(
224+
dataset,
225+
dataset_name,
226+
_,
227+
_,
228+
) = check_dataset_local_requirements(
229+
benchmark_config,
230+
temporary_dir,
231+
None,
232+
"./datasets",
233+
"dbconfig",
234+
1,
235+
False,
236+
)
237+
214238
dso = "redis-server"
215239
profilers_artifacts_matrix = []
216240

@@ -285,6 +309,9 @@ def process_self_contained_coordinator_stream(
285309
client_mnt_point = "/mnt/client/"
286310
benchmark_tool_workdir = client_mnt_point
287311

312+
logging.info(
313+
"Checking if there is a data preload_tool requirement"
314+
)
288315
if "preload_tool" in benchmark_config["dbconfig"]:
289316
data_prepopulation_step(
290317
benchmark_config,
@@ -297,6 +324,14 @@ def process_self_contained_coordinator_stream(
297324
test_name,
298325
)
299326

327+
logging.info(
328+
"Checking if there is a keyspace check being enforced"
329+
)
330+
dbconfig_keyspacelen_check(
331+
benchmark_config,
332+
[r],
333+
)
334+
300335
benchmark_tool = extract_client_tool(benchmark_config)
301336
# backwards compatible
302337
if benchmark_tool is None:

redis_benchmarks_specification/setups/builders/icc-2021.3.0-amd64-ubuntu18.04-libc.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
version: 0.4
2+
name: "memtier_benchmark-1key-geo-60M-elements-geodist-pipeline-10"
3+
description: "Runs memtier_benchmark, for a keyspace length of 1 GEO key.
4+
The GEO key contains 60841557 elements in it and we query it using GEODIST command between 2 elements.
5+
"
6+
dbconfig:
7+
- configuration-parameters:
8+
- save: '""'
9+
- dataset: "https://s3.us-east-2.amazonaws.com/redis.benchmarks.spec/datasets/geopoint/dump.rdb"
10+
11+
tested-groups:
12+
- geo
13+
tested-commands:
14+
- GEODIST
15+
redis-topologies:
16+
- oss-standalone
17+
18+
build-variants:
19+
- gcc:8.5.0-amd64-debian-buster-default
20+
21+
clientconfig:
22+
run_image: redislabs/memtier_benchmark:edge
23+
tool: memtier_benchmark
24+
arguments: '--pipeline 10 -c 2 -t 2 --command="GEODIST key 1 2" --hide-histogram --test-time 180'
25+
resources:
26+
requests:
27+
cpus: "4"
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"'
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
version: 0.4
2+
name: "memtier_benchmark-1key-geo-60M-elements-geodist"
3+
description: "Runs memtier_benchmark, for a keyspace length of 1 GEO key.
4+
The GEO key contains 60841557 elements in it and we query it using GEODIST command between 2 elements.
5+
"
6+
dbconfig:
7+
- configuration-parameters:
8+
- save: '""'
9+
- dataset: "https://s3.us-east-2.amazonaws.com/redis.benchmarks.spec/datasets/geopoint/dump.rdb"
10+
11+
tested-groups:
12+
- geo
13+
tested-commands:
14+
- GEODIST
15+
redis-topologies:
16+
- oss-standalone
17+
18+
build-variants:
19+
- gcc:8.5.0-amd64-debian-buster-default
20+
21+
clientconfig:
22+
run_image: redislabs/memtier_benchmark:edge
23+
tool: memtier_benchmark
24+
arguments: '-c 2 -t 2 --command="GEODIST key 1 2" --hide-histogram --test-time 180'
25+
resources:
26+
requests:
27+
cpus: "4"
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"'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
version: 0.4
2+
name: "memtier_benchmark-1key-geo-60M-elements-geohash-pipeline-10"
3+
description: "Runs memtier_benchmark, for a keyspace length of 1 GEO key.
4+
The GEO key contains 60841557 elements in it and we query it using GEOHASH command.
5+
"
6+
dbconfig:
7+
- configuration-parameters:
8+
- save: '""'
9+
- dataset: "https://s3.us-east-2.amazonaws.com/redis.benchmarks.spec/datasets/geopoint/dump.rdb"
10+
11+
tested-groups:
12+
- geo
13+
tested-commands:
14+
- GEOHASH
15+
redis-topologies:
16+
- oss-standalone
17+
18+
build-variants:
19+
- gcc:8.5.0-amd64-debian-buster-default
20+
21+
clientconfig:
22+
run_image: redislabs/memtier_benchmark:edge
23+
tool: memtier_benchmark
24+
arguments: '--pipeline 10 -c 2 -t 2 --command="GEOHASH key 1" --hide-histogram --test-time 180'
25+
resources:
26+
requests:
27+
cpus: "4"
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"'
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
version: 0.4
2+
name: "memtier_benchmark-1key-geo-60M-elements-geohash"
3+
description: "Runs memtier_benchmark, for a keyspace length of 1 GEO key.
4+
The GEO key contains 60841557 elements in it and we query it using GEOHASH command.
5+
"
6+
dbconfig:
7+
- configuration-parameters:
8+
- save: '""'
9+
- dataset: "https://s3.us-east-2.amazonaws.com/redis.benchmarks.spec/datasets/geopoint/dump.rdb"
10+
11+
tested-groups:
12+
- geo
13+
tested-commands:
14+
- GEOHASH
15+
redis-topologies:
16+
- oss-standalone
17+
18+
build-variants:
19+
- gcc:8.5.0-amd64-debian-buster-default
20+
21+
clientconfig:
22+
run_image: redislabs/memtier_benchmark:edge
23+
tool: memtier_benchmark
24+
arguments: '-c 2 -t 2 --command="GEOHASH key 1" --hide-histogram --test-time 180'
25+
resources:
26+
requests:
27+
cpus: "4"
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)