Skip to content

Commit f0cb2fc

Browse files
wip
1 parent edf7329 commit f0cb2fc

File tree

228 files changed

+7160
-1032
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

228 files changed

+7160
-1032
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.281"
3+
version = "0.1.291"
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/__common__/runner.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ def exporter_datasink_common(
196196
]
197197
},
198198
)
199+
print(overall_end_time_metrics)
199200
# 7 days from now
200201
expire_redis_metrics_ms = 7 * 24 * 60 * 60 * 1000
201202
export_redis_metrics(
@@ -234,3 +235,19 @@ def exporter_datasink_common(
234235
{"metric-type": "commandstats"},
235236
expire_redis_metrics_ms,
236237
)
238+
239+
# Update deployment tracking sets
240+
deployment_type_and_name = f"{setup_type}_AND_{setup_name}"
241+
deployment_type_and_name_and_version = f"{setup_type}_AND_{setup_name}_AND_{git_version}"
242+
243+
# Add to deployment-specific set
244+
deployment_set_key = f"ci.benchmarks.redislabs/{tf_triggering_env}/{deployment_type_and_name_and_version}:set"
245+
datasink_conn.sadd(deployment_set_key, test_name)
246+
247+
# Add to testcases set
248+
testcases_set_key = f"ci.benchmarks.redislabs/{tf_triggering_env}/testcases:set"
249+
datasink_conn.sadd(testcases_set_key, test_name)
250+
251+
# Add metadata fields to timeseries metadata
252+
metadata["deployment_type_AND_deployment_name"] = deployment_type_and_name
253+
metadata["deployment_type_AND_deployment_name_AND_version"] = deployment_type_and_name_and_version

redis_benchmarks_specification/__common__/timeseries.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,11 @@ def extract_results_table(
147147

148148
# For precision_summary metrics, construct the full resolved path for display
149149
display_path = metric_jsonpath
150-
if "precision_summary" in metric_jsonpath and "*" in metric_jsonpath and use_metric_context_path:
150+
if (
151+
"precision_summary" in metric_jsonpath
152+
and "*" in metric_jsonpath
153+
and use_metric_context_path
154+
):
151155
# Replace the wildcard with the actual precision level
152156
display_path = metric_jsonpath.replace("*", metric_context_path)
153157

@@ -156,7 +160,10 @@ def extract_results_table(
156160
metric_name = metric_jsonpath
157161
else:
158162
# For display purposes, use the resolved path for precision_summary
159-
if "precision_summary" in metric_jsonpath and "*" in metric_jsonpath:
163+
if (
164+
"precision_summary" in metric_jsonpath
165+
and "*" in metric_jsonpath
166+
):
160167
metric_name = display_path
161168
else:
162169
# Clean up the metric name for other cases
@@ -167,7 +174,11 @@ def extract_results_table(
167174
metric_name = metric_name.replace(" ", "_")
168175

169176
# Apply standard cleaning to all metric names
170-
if not ("precision_summary" in metric_jsonpath and "*" in metric_jsonpath and use_metric_context_path):
177+
if not (
178+
"precision_summary" in metric_jsonpath
179+
and "*" in metric_jsonpath
180+
and use_metric_context_path
181+
):
171182
metric_name = metric_name.replace("'", "")
172183
metric_name = metric_name.replace('"', "")
173184
metric_name = metric_name.replace("(", "")

redis_benchmarks_specification/__compare__/args.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ def create_compare_arguments(parser):
6161
"--triggering_env_baseline",
6262
type=str,
6363
default=None,
64-
help="Triggering environment for baseline data. If not specified, falls back to --triggering_env"
64+
help="Triggering environment for baseline data. If not specified, falls back to --triggering_env",
6565
)
6666
parser.add_argument(
6767
"--triggering_env_comparison",
6868
type=str,
6969
default=None,
70-
help="Triggering environment for comparison data. If not specified, falls back to --triggering_env"
70+
help="Triggering environment for comparison data. If not specified, falls back to --triggering_env",
7171
)
7272
parser.add_argument("--github_token", type=str, default=PERFORMANCE_GH_TOKEN)
7373
parser.add_argument("--pull-request", type=str, default=None, nargs="?", const="")
@@ -83,13 +83,13 @@ def create_compare_arguments(parser):
8383
"--running_platform_baseline",
8484
type=str,
8585
default=None,
86-
help="Platform for baseline data. If not specified, falls back to --running_platform"
86+
help="Platform for baseline data. If not specified, falls back to --running_platform",
8787
)
8888
parser.add_argument(
8989
"--running_platform_comparison",
9090
type=str,
9191
default=None,
92-
help="Platform for comparison data. If not specified, falls back to --running_platform"
92+
help="Platform for comparison data. If not specified, falls back to --running_platform",
9393
)
9494
parser.add_argument("--extra-filter", type=str, default=None)
9595
parser.add_argument(

redis_benchmarks_specification/__compare__/compare.py

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,9 @@ def compare_command_logic(args, project_name, project_version):
255255
# Handle separate baseline and comparison platform/environment arguments
256256
# Fall back to general arguments if specific ones are not provided
257257
running_platform_baseline = args.running_platform_baseline or args.running_platform
258-
running_platform_comparison = args.running_platform_comparison or args.running_platform
258+
running_platform_comparison = (
259+
args.running_platform_comparison or args.running_platform
260+
)
259261
triggering_env_baseline = args.triggering_env_baseline or args.triggering_env
260262
triggering_env_comparison = args.triggering_env_comparison or args.triggering_env
261263

@@ -731,7 +733,9 @@ def compute_regression_table(
731733
_,
732734
_,
733735
_,
734-
) = get_overall_dashboard_keynames(tf_github_org, tf_github_repo, tf_triggering_env_baseline)
736+
) = get_overall_dashboard_keynames(
737+
tf_github_org, tf_github_repo, tf_triggering_env_baseline
738+
)
735739
test_names = []
736740
used_key = testcases_setname
737741
test_filter = "test_name"
@@ -1167,33 +1171,41 @@ def from_rts_to_regression_table(
11671171
multi_value_comparison = check_multi_value_filter(comparison_str)
11681172

11691173
filters_baseline = [
1170-
"{}={}".format(by_str_baseline, baseline_str),
11711174
"metric={}".format(metric_name),
11721175
"{}={}".format(test_filter, test_name),
1173-
"deployment_name={}".format(baseline_deployment_name),
11741176
"github_repo={}".format(baseline_github_repo),
11751177
"triggering_env={}".format(tf_triggering_env_baseline),
11761178
]
1179+
if baseline_str != "":
1180+
filters_baseline.append("{}={}".format(by_str_baseline, baseline_str))
1181+
if baseline_deployment_name != "":
1182+
filters_baseline.append("deployment_name={}".format(baseline_deployment_name))
11771183
if baseline_github_org != "":
11781184
filters_baseline.append(f"github_org={baseline_github_org}")
11791185
if running_platform_baseline is not None:
1180-
filters_baseline.append("running_platform={}".format(running_platform_baseline))
1186+
filters_baseline.append(
1187+
"running_platform={}".format(running_platform_baseline)
1188+
)
11811189
filters_comparison = [
1182-
"{}={}".format(by_str_comparison, comparison_str),
11831190
"metric={}".format(metric_name),
11841191
"{}={}".format(test_filter, test_name),
1185-
"deployment_name={}".format(comparison_deployment_name),
11861192
"github_repo={}".format(comparison_github_repo),
11871193
"triggering_env={}".format(tf_triggering_env_comparison),
11881194
]
1195+
if comparison_str != "":
1196+
filters_comparison.append("{}={}".format(by_str_comparison, comparison_str))
1197+
if comparison_deployment_name != "":
1198+
filters_comparison.append("deployment_name={}".format(comparison_deployment_name))
11891199
if comparison_github_org != "":
11901200
filters_comparison.append(f"github_org={comparison_github_org}")
11911201
if "hash" not in by_str_baseline:
11921202
filters_baseline.append("hash==")
11931203
if "hash" not in by_str_comparison:
11941204
filters_comparison.append("hash==")
11951205
if running_platform_comparison is not None:
1196-
filters_comparison.append("running_platform={}".format(running_platform_comparison))
1206+
filters_comparison.append(
1207+
"running_platform={}".format(running_platform_comparison)
1208+
)
11971209
baseline_timeseries = rts.ts().queryindex(filters_baseline)
11981210
comparison_timeseries = rts.ts().queryindex(filters_comparison)
11991211

redis_benchmarks_specification/__runner__/args.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ def create_client_runner_args(project_name):
2020
description=project_name,
2121
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
2222
)
23+
parser.add_argument(
24+
"--version",
25+
action="version",
26+
version=project_name,
27+
help="Show version information and exit",
28+
)
2329
parser.add_argument(
2430
"--platform-name",
2531
type=str,
@@ -34,6 +40,24 @@ def create_client_runner_args(project_name):
3440
)
3541
parser.add_argument("--triggering_env", type=str, default="ci")
3642
parser.add_argument("--setup_type", type=str, default="oss-standalone")
43+
parser.add_argument(
44+
"--deployment_type",
45+
type=str,
46+
default="oss-standalone",
47+
help="Deployment type for the Redis instance (e.g., oss-standalone, oss-cluster, enterprise)"
48+
)
49+
parser.add_argument(
50+
"--deployment_name",
51+
type=str,
52+
default="redis",
53+
help="Deployment name identifier for the Redis instance"
54+
)
55+
parser.add_argument(
56+
"--core_count",
57+
type=int,
58+
default=None,
59+
help="Number of CPU cores available to the Redis instance"
60+
)
3761
parser.add_argument("--github_repo", type=str, default="redis")
3862
parser.add_argument("--github_org", type=str, default="redis")
3963
parser.add_argument("--github_version", type=str, default="NA")
@@ -152,6 +176,18 @@ def create_client_runner_args(project_name):
152176
action="store_true",
153177
help="Run tests that contain a dbconfig with dataset",
154178
)
179+
parser.add_argument(
180+
"--skip-tests-without-dataset",
181+
default=False,
182+
action="store_true",
183+
help="Skip tests that do not contain a dbconfig with dataset",
184+
)
185+
parser.add_argument(
186+
"--memory-comparison-only",
187+
default=False,
188+
action="store_true",
189+
help="Run memory comparison only - execute preload and measure memory usage without client benchmarks",
190+
)
155191
parser.add_argument(
156192
"--client_aggregated_results_folder",
157193
type=str,

0 commit comments

Comments
 (0)