Skip to content

Commit 1883f2f

Browse files
Extended comparison tool and included HELLO, GEOPOS, GEORADIUS and SISMEMBER new benchmarks (#266)
* 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
1 parent 944efa1 commit 1883f2f

10 files changed

+295
-28
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.218"
3+
version = "0.1.219"
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/__compare__/args.py

+6
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ def create_compare_arguments(parser):
9696
parser.add_argument(
9797
"--baseline-target-version", type=str, default=None, required=False
9898
)
99+
parser.add_argument(
100+
"--baseline-target-branch", type=str, default=None, required=False
101+
)
99102
parser.add_argument("--comparison-branch", type=str, default=None, required=False)
100103
parser.add_argument(
101104
"--baseline-github-repo", type=str, default="redis", required=False
@@ -108,6 +111,9 @@ def create_compare_arguments(parser):
108111
parser.add_argument(
109112
"--comparison-target-version", type=str, default=None, required=False
110113
)
114+
parser.add_argument(
115+
"--comparison-target-branch", type=str, default=None, required=False
116+
)
111117
parser.add_argument("--print-regressions-only", type=bool, default=False)
112118
parser.add_argument("--print-improvements-only", type=bool, default=False)
113119
parser.add_argument("--skip-unstable", type=bool, default=False)

redis_benchmarks_specification/__compare__/compare.py

+69-27
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@ def compare_command_logic(args, project_name, project_version):
203203
)
204204
)
205205
baseline_branch = default_baseline_branch
206+
if baseline_branch == "":
207+
baseline_branch = None
206208
comparison_branch = args.comparison_branch
207209
simplify_table = args.simple_table
208210
print_regressions_only = args.print_regressions_only
@@ -250,6 +252,8 @@ def compare_command_logic(args, project_name, project_version):
250252
running_platform = args.running_platform
251253
baseline_target_version = args.baseline_target_version
252254
comparison_target_version = args.comparison_target_version
255+
baseline_target_branch = args.baseline_target_branch
256+
comparison_target_branch = args.comparison_target_branch
253257
baseline_github_repo = args.baseline_github_repo
254258
comparison_github_repo = args.comparison_github_repo
255259
baseline_hash = args.baseline_hash
@@ -318,6 +322,8 @@ def compare_command_logic(args, project_name, project_version):
318322
comparison_hash,
319323
baseline_github_repo,
320324
comparison_github_repo,
325+
baseline_target_branch,
326+
comparison_target_branch,
321327
)
322328
prepare_regression_comment(
323329
auto_approve,
@@ -547,6 +553,8 @@ def compute_regression_table(
547553
baseline_hash=None,
548554
baseline_github_repo="redis",
549555
comparison_github_repo="redis",
556+
baseline_target_branch=None,
557+
comparison_target_branch=None,
550558
):
551559
START_TIME_NOW_UTC, _, _ = get_start_time_vars()
552560
START_TIME_LAST_MONTH_UTC = START_TIME_NOW_UTC - datetime.timedelta(days=31)
@@ -574,6 +582,8 @@ def compute_regression_table(
574582
comparison_target_version,
575583
comparison_hash,
576584
baseline_hash,
585+
baseline_target_branch,
586+
comparison_target_branch,
577587
)
578588
logging.info(f"Using baseline filter {by_str_baseline}={baseline_str}")
579589
logging.info(f"Using comparison filter {by_str_comparison}={comparison_str}")
@@ -739,6 +749,11 @@ def compute_regression_table(
739749
)
740750

741751

752+
def get_by_error(name, by_str_arr):
753+
by_string = ",".join(by_str_arr)
754+
return f"--{name}-branch, --{name}-tag, --{name}-target-branch, --{name}-hash, and --{name}-target-version are mutually exclusive. You selected a total of {len(by_str_arr)}: {by_string}. Pick one..."
755+
756+
742757
def get_by_strings(
743758
baseline_branch,
744759
comparison_branch,
@@ -748,57 +763,73 @@ def get_by_strings(
748763
comparison_target_version=None,
749764
baseline_hash=None,
750765
comparison_hash=None,
766+
baseline_target_branch=None,
767+
comparison_target_branch=None,
751768
):
752769
baseline_covered = False
753770
comparison_covered = False
754771
by_str_baseline = ""
755772
by_str_comparison = ""
756773
baseline_str = ""
757774
comparison_str = ""
775+
baseline_by_arr = []
776+
comparison_by_arr = []
777+
778+
################# BASELINE BY ....
779+
758780
if baseline_branch is not None:
759-
baseline_covered = True
760781
by_str_baseline = "branch"
782+
baseline_covered = True
761783
baseline_str = baseline_branch
762-
if comparison_branch is not None:
763-
comparison_covered = True
764-
by_str_comparison = "branch"
765-
comparison_str = comparison_branch
784+
baseline_by_arr.append(by_str_baseline)
766785

767786
if baseline_tag is not None:
768-
if comparison_covered:
769-
logging.error(
770-
"--baseline-branch and --baseline-tag are mutually exclusive. Pick one..."
771-
)
787+
by_str_baseline = "version"
788+
if baseline_covered:
789+
baseline_by_arr.append(by_str_baseline)
790+
logging.error(get_by_error("baseline", baseline_by_arr))
772791
exit(1)
773792
baseline_covered = True
774-
by_str_baseline = "version"
775793
baseline_str = baseline_tag
776794

777795
if baseline_target_version is not None:
778-
if comparison_covered:
779-
logging.error(
780-
"--baseline-branch, --baseline-tag and --baseline-target-version are mutually exclusive. Pick one..."
781-
)
796+
by_str_baseline = "target+version"
797+
if baseline_covered:
798+
baseline_by_arr.append(by_str_baseline)
799+
logging.error(get_by_error("baseline", baseline_by_arr))
782800
exit(1)
783801
baseline_covered = True
784-
by_str_baseline = "target+version"
785802
baseline_str = baseline_target_version
786803

787804
if baseline_hash is not None:
788-
if comparison_covered:
789-
logging.error(
790-
"--baseline-branch, --baseline-tag, --baseline-hash, and --baseline-target-version are mutually exclusive. Pick one..."
791-
)
805+
by_str_baseline = "hash"
806+
if baseline_covered:
807+
baseline_by_arr.append(by_str_baseline)
808+
logging.error(get_by_error("baseline", baseline_by_arr))
792809
exit(1)
793810
baseline_covered = True
794-
by_str_baseline = "hash"
795811
baseline_str = baseline_hash
812+
if baseline_target_branch is not None:
813+
by_str_baseline = "target+branch"
814+
if baseline_covered:
815+
baseline_by_arr.append(by_str_baseline)
816+
logging.error(get_by_error("baseline", baseline_by_arr))
817+
exit(1)
818+
baseline_covered = True
819+
baseline_str = baseline_target_branch
820+
821+
################# COMPARISON BY ....
822+
823+
if comparison_branch is not None:
824+
by_str_comparison = "branch"
825+
comparison_covered = True
826+
comparison_str = comparison_branch
796827

797828
if comparison_tag is not None:
798829
# check if we had already covered comparison
799830
if comparison_covered:
800831
logging.error(
801-
"--comparison-branch and --comparison-tag are mutually exclusive. Pick one..."
832+
"--comparison-branch and --comparison-tag, --comparison-hash, --comparison-target-branch, and --comparison-target-table are mutually exclusive. Pick one..."
802833
)
803834
exit(1)
804835
comparison_covered = True
@@ -808,18 +839,29 @@ def get_by_strings(
808839
# check if we had already covered comparison
809840
if comparison_covered:
810841
logging.error(
811-
"--comparison-branch, --comparison-tag, and --comparison-target-table are mutually exclusive. Pick one..."
842+
"--comparison-branch, --comparison-tag, --comparison-hash, --comparison-target-branch, and --comparison-target-table are mutually exclusive. Pick one..."
812843
)
813844
exit(1)
814845
comparison_covered = True
815846
by_str_comparison = "target+version"
816847
comparison_str = comparison_target_version
817848

849+
if comparison_target_branch is not None:
850+
# check if we had already covered comparison
851+
if comparison_covered:
852+
logging.error(
853+
"--comparison-branch, --comparison-tag, --comparison-hash, --comparison-target-branch, and --comparison-target-table are mutually exclusive. Pick one..."
854+
)
855+
exit(1)
856+
comparison_covered = True
857+
by_str_comparison = "target+branch"
858+
comparison_str = comparison_target_branch
859+
818860
if comparison_hash is not None:
819861
# check if we had already covered comparison
820862
if comparison_covered:
821863
logging.error(
822-
"--comparison-branch, --comparison-tag, --comparison-hash, and --comparison-target-table are mutually exclusive. Pick one..."
864+
"--comparison-branch, --comparison-tag, --comparison-hash, --comparison-target-branch, and --comparison-target-table are mutually exclusive. Pick one..."
823865
)
824866
exit(1)
825867
comparison_covered = True
@@ -829,13 +871,13 @@ def get_by_strings(
829871
if baseline_covered is False:
830872
logging.error(
831873
"You need to provider either "
832-
+ "( --baseline-branch, --baseline-tag, --baseline-hash, or --baseline-target-version ) "
874+
+ "( --baseline-branch, --baseline-tag, --baseline-hash, --baseline-target-branch or --baseline-target-version ) "
833875
)
834876
exit(1)
835877
if comparison_covered is False:
836878
logging.error(
837879
"You need to provider either "
838-
+ "( --comparison-branch, --comparison-tag, --comparison-hash, or --comparison-target-version ) "
880+
+ "( --comparison-branch, --comparison-tag, --comparison-hash, --comparison-target-branch or --comparison-target-version ) "
839881
)
840882
exit(1)
841883
return baseline_str, by_str_baseline, comparison_str, by_str_comparison
@@ -1252,9 +1294,9 @@ def get_v_pct_change_and_largest_var(
12521294
if last_n < 0 or (last_n > 0 and len(comparison_values) < last_n):
12531295
comparison_values.append(tuple[1])
12541296
comparison_df = pd.DataFrame(comparison_values)
1255-
comparison_median = float(comparison_df.median())
1297+
comparison_median = float(comparison_df.median().iloc[0])
12561298
comparison_v = comparison_median
1257-
comparison_std = float(comparison_df.std())
1299+
comparison_std = float(comparison_df.std().iloc[0])
12581300
if verbose:
12591301
logging.info(
12601302
"comparison_datapoints: {} value: {}; std-dev: {}; median: {}".format(
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
version: 0.4
2+
name: memtier_benchmark-1key-geo-2-elements-geopos
3+
description: 'Runs memtier_benchmark, for a keyspace length of 1 GEO key. The GEO key contains 2 elements and comes from the example of https://redis.io/docs/latest/commands/geopos, and we query it using GEOPOS command.'
4+
dbconfig:
5+
configuration-parameters:
6+
save: '""'
7+
check:
8+
keyspacelen: 1
9+
resources:
10+
requests:
11+
memory: 1g
12+
init_commands:
13+
- '"GEOADD" "Sicily" "13.361389" "38.115556" "Palermo" "15.087269" "37.502669" "Catania"'
14+
tested-groups:
15+
- geo
16+
tested-commands:
17+
- geopos
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: -c 50 -t 4 --command="GEOPOS Sicily Palermo Catania" --hide-histogram --test-time 120
27+
resources:
28+
requests:
29+
cpus: '4'
30+
memory: 2g
31+
32+
priority: 138
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
version: 0.4
2+
name: memtier_benchmark-1key-geo-2-elements-geosearch-fromlonlat-withcoord
3+
description: 'Runs memtier_benchmark, for a keyspace length of 1 GEO key. The GEO key contains 2 elements and comes from the example of https://redis.io/docs/latest/commands/geosearch, and we query it using GEOSEARCH command.'
4+
dbconfig:
5+
configuration-parameters:
6+
save: '""'
7+
check:
8+
keyspacelen: 1
9+
resources:
10+
requests:
11+
memory: 1g
12+
init_commands:
13+
- '"GEOADD" "Sicily" "13.361389" "38.115556" "Palermo" "15.087269" "37.502669" "Catania"'
14+
- '"GEOADD" "Sicily" "12.758489" "38.788135" "edge1" "17.241510" "38.788135" "edge2"'
15+
tested-groups:
16+
- geo
17+
tested-commands:
18+
- geosearch
19+
redis-topologies:
20+
- oss-standalone
21+
build-variants:
22+
- gcc:8.5.0-amd64-debian-buster-default
23+
- dockerhub
24+
clientconfig:
25+
run_image: redislabs/memtier_benchmark:edge
26+
tool: memtier_benchmark
27+
arguments: -c 50 -t 4 --command="GEOSEARCH Sicily FROMLONLAT 15 37 BYBOX 400 400 km ASC WITHCOORD WITHDIST" --hide-histogram --test-time 120
28+
resources:
29+
requests:
30+
cpus: '4'
31+
memory: 2g
32+
33+
priority: 138
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
version: 0.4
2+
name: memtier_benchmark-1key-set-100-elements-sismember-is-a-member
3+
description: 'Runs memtier_benchmark, for a keyspace length of 1 SET key. The SET contains 100 elements in it and we query it using SISMEMBER in which the value is a member. '
4+
dbconfig:
5+
configuration-parameters:
6+
save: '""'
7+
check:
8+
keyspacelen: 1
9+
resources:
10+
requests:
11+
memory: 1g
12+
init_commands:
13+
- '"SADD" "set:100" "vyoomgwuzv" "xamjodnbpf" "ewomnmugfa" "ljcgdooafo" "pcxdhdjwnf" "djetcyfxuc" "licotqplim" "alqlzsvuuz" "ijsmoyesvd" "whmotknaff" "rkaznetutk" "ksqpdywgdd" "gorgpnnqwr" "gekntrykfh" "rjkknoigmu" "luemuetmia" "gxephxbdru" "ncjfckgkcl" "hhjclfbbka" "cgoeihlnei" "zwnitejtpg" "upodnpqenn" "mibvtmqxcy" "htvbwmfyic" "rqvryfvlie" "nxcdcaqgit" "gfdqdrondm" "lysbgqqfqw" "nxzsnkmxvi" "nsxaigrnje" "cwaveajmcz" "xsepfhdizi" "owtkxlzaci" "agsdggdghc" "tcjvjofxtd" "kgqrovsxce" "ouuybhtvyb" "ueyrvldzwl" "vpbkvwgxsf" "pytrnqdhvs" "qbiwbqiubb" "ssjqrsluod" "urvgxwbiiz" "ujrxcmpvsq" "mtccjerdon" "xczfmrxrja" "imyizmhzjk" "oguwnmniig" "mxwgdcutnb" "pqyurbvifk" "ccagtnjilc" "mbxohpancs" "lgrkndhekf" "eqlgkwosie" "jxoxtnzujs" "lbtpbknelm" "ichqzmiyot" "mbgehjiauu" "aovfsvbwjg" "nmgxcctxpn" "vyqqkuszzh" "rojeolnopp" "ibhohmfxzt" "qbyhorvill" "nhfnbxqgol" "wkbasfyzqz" "mjjuylgssm" "imdqxmkzdj" "oapbvnisyq" "bqntlsaqjb" "ocrcszcznp" "hhniikmtsx" "hlpdstpvzw" "wqiwdbncmt" "vymjzlzqcn" "hhjchwjlmc" "ypfeltycpy" "qjyeqcfhjj" "uapsgmizgh" "owbbdezgxn" "qrosceblyo" "sahqeskveq" "dapacykoah" "wvcnqbvlnf" "perfwnpvkl" "ulbrotlhze" "fhuvzpxjbc" "holjcdpijr" "onzjrteqmu" "pquewclxuy" "vpmpffdoqz" "eouliovvra" "vxcbagyymm" "jekkafodvk" "ypekeuutef" "dlbqcynhrn" "erxulvebrj" "qwxrsgafzy" "dlsjwmqzhx" "exvhmqxvvp"'
14+
tested-groups:
15+
- set
16+
tested-commands:
17+
- sismember
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: --command="SISMEMBER set:100 lysbgqqfqw" --hide-histogram --test-time 180
27+
resources:
28+
requests:
29+
cpus: '4'
30+
memory: 2g
31+
32+
priority: 1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
version: 0.4
2+
name: memtier_benchmark-1key-set-100-elements-sismember-not-a-member
3+
description: 'Runs memtier_benchmark, for a keyspace length of 1 SET key. The SET contains 100 elements in it and we query it using SISMEMBER in which the value is not a member. '
4+
dbconfig:
5+
configuration-parameters:
6+
save: '""'
7+
check:
8+
keyspacelen: 1
9+
resources:
10+
requests:
11+
memory: 1g
12+
init_commands:
13+
- '"SADD" "set:100" "vyoomgwuzv" "xamjodnbpf" "ewomnmugfa" "ljcgdooafo" "pcxdhdjwnf" "djetcyfxuc" "licotqplim" "alqlzsvuuz" "ijsmoyesvd" "whmotknaff" "rkaznetutk" "ksqpdywgdd" "gorgpnnqwr" "gekntrykfh" "rjkknoigmu" "luemuetmia" "gxephxbdru" "ncjfckgkcl" "hhjclfbbka" "cgoeihlnei" "zwnitejtpg" "upodnpqenn" "mibvtmqxcy" "htvbwmfyic" "rqvryfvlie" "nxcdcaqgit" "gfdqdrondm" "lysbgqqfqw" "nxzsnkmxvi" "nsxaigrnje" "cwaveajmcz" "xsepfhdizi" "owtkxlzaci" "agsdggdghc" "tcjvjofxtd" "kgqrovsxce" "ouuybhtvyb" "ueyrvldzwl" "vpbkvwgxsf" "pytrnqdhvs" "qbiwbqiubb" "ssjqrsluod" "urvgxwbiiz" "ujrxcmpvsq" "mtccjerdon" "xczfmrxrja" "imyizmhzjk" "oguwnmniig" "mxwgdcutnb" "pqyurbvifk" "ccagtnjilc" "mbxohpancs" "lgrkndhekf" "eqlgkwosie" "jxoxtnzujs" "lbtpbknelm" "ichqzmiyot" "mbgehjiauu" "aovfsvbwjg" "nmgxcctxpn" "vyqqkuszzh" "rojeolnopp" "ibhohmfxzt" "qbyhorvill" "nhfnbxqgol" "wkbasfyzqz" "mjjuylgssm" "imdqxmkzdj" "oapbvnisyq" "bqntlsaqjb" "ocrcszcznp" "hhniikmtsx" "hlpdstpvzw" "wqiwdbncmt" "vymjzlzqcn" "hhjchwjlmc" "ypfeltycpy" "qjyeqcfhjj" "uapsgmizgh" "owbbdezgxn" "qrosceblyo" "sahqeskveq" "dapacykoah" "wvcnqbvlnf" "perfwnpvkl" "ulbrotlhze" "fhuvzpxjbc" "holjcdpijr" "onzjrteqmu" "pquewclxuy" "vpmpffdoqz" "eouliovvra" "vxcbagyymm" "jekkafodvk" "ypekeuutef" "dlbqcynhrn" "erxulvebrj" "qwxrsgafzy" "dlsjwmqzhx" "exvhmqxvvp"'
14+
tested-groups:
15+
- set
16+
tested-commands:
17+
- sismember
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: --command="SISMEMBER set:100 not-a-member" --hide-histogram --test-time 180
27+
resources:
28+
requests:
29+
cpus: '4'
30+
memory: 2g
31+
32+
priority: 1

0 commit comments

Comments
 (0)