redis-benchmarks-specification 0.1.281__py3-none-any.whl → 0.1.283__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of redis-benchmarks-specification might be problematic. Click here for more details.
- redis_benchmarks_specification/__common__/timeseries.py +14 -3
- redis_benchmarks_specification/__compare__/args.py +24 -0
- redis_benchmarks_specification/__compare__/compare.py +161 -59
- redis_benchmarks_specification/__runner__/args.py +6 -0
- redis_benchmarks_specification/__runner__/remote_profiling.py +228 -50
- redis_benchmarks_specification/__runner__/runner.py +244 -76
- {redis_benchmarks_specification-0.1.281.dist-info → redis_benchmarks_specification-0.1.283.dist-info}/METADATA +1 -1
- {redis_benchmarks_specification-0.1.281.dist-info → redis_benchmarks_specification-0.1.283.dist-info}/RECORD +11 -11
- {redis_benchmarks_specification-0.1.281.dist-info → redis_benchmarks_specification-0.1.283.dist-info}/LICENSE +0 -0
- {redis_benchmarks_specification-0.1.281.dist-info → redis_benchmarks_specification-0.1.283.dist-info}/WHEEL +0 -0
- {redis_benchmarks_specification-0.1.281.dist-info → redis_benchmarks_specification-0.1.283.dist-info}/entry_points.txt +0 -0
|
@@ -147,7 +147,11 @@ def extract_results_table(
|
|
|
147
147
|
|
|
148
148
|
# For precision_summary metrics, construct the full resolved path for display
|
|
149
149
|
display_path = metric_jsonpath
|
|
150
|
-
if
|
|
150
|
+
if (
|
|
151
|
+
"precision_summary" in metric_jsonpath
|
|
152
|
+
and "*" in metric_jsonpath
|
|
153
|
+
and use_metric_context_path
|
|
154
|
+
):
|
|
151
155
|
# Replace the wildcard with the actual precision level
|
|
152
156
|
display_path = metric_jsonpath.replace("*", metric_context_path)
|
|
153
157
|
|
|
@@ -156,7 +160,10 @@ def extract_results_table(
|
|
|
156
160
|
metric_name = metric_jsonpath
|
|
157
161
|
else:
|
|
158
162
|
# For display purposes, use the resolved path for precision_summary
|
|
159
|
-
if
|
|
163
|
+
if (
|
|
164
|
+
"precision_summary" in metric_jsonpath
|
|
165
|
+
and "*" in metric_jsonpath
|
|
166
|
+
):
|
|
160
167
|
metric_name = display_path
|
|
161
168
|
else:
|
|
162
169
|
# Clean up the metric name for other cases
|
|
@@ -167,7 +174,11 @@ def extract_results_table(
|
|
|
167
174
|
metric_name = metric_name.replace(" ", "_")
|
|
168
175
|
|
|
169
176
|
# Apply standard cleaning to all metric names
|
|
170
|
-
if not (
|
|
177
|
+
if not (
|
|
178
|
+
"precision_summary" in metric_jsonpath
|
|
179
|
+
and "*" in metric_jsonpath
|
|
180
|
+
and use_metric_context_path
|
|
181
|
+
):
|
|
171
182
|
metric_name = metric_name.replace("'", "")
|
|
172
183
|
metric_name = metric_name.replace('"', "")
|
|
173
184
|
metric_name = metric_name.replace("(", "")
|
|
@@ -57,6 +57,18 @@ def create_compare_arguments(parser):
|
|
|
57
57
|
parser.add_argument("--baseline_github_org", type=str, default="")
|
|
58
58
|
parser.add_argument("--comparison_github_org", type=str, default="")
|
|
59
59
|
parser.add_argument("--triggering_env", type=str, default="ci")
|
|
60
|
+
parser.add_argument(
|
|
61
|
+
"--triggering_env_baseline",
|
|
62
|
+
type=str,
|
|
63
|
+
default=None,
|
|
64
|
+
help="Triggering environment for baseline data. If not specified, falls back to --triggering_env",
|
|
65
|
+
)
|
|
66
|
+
parser.add_argument(
|
|
67
|
+
"--triggering_env_comparison",
|
|
68
|
+
type=str,
|
|
69
|
+
default=None,
|
|
70
|
+
help="Triggering environment for comparison data. If not specified, falls back to --triggering_env",
|
|
71
|
+
)
|
|
60
72
|
parser.add_argument("--github_token", type=str, default=PERFORMANCE_GH_TOKEN)
|
|
61
73
|
parser.add_argument("--pull-request", type=str, default=None, nargs="?", const="")
|
|
62
74
|
parser.add_argument("--deployment_name", type=str, default="oss-standalone")
|
|
@@ -67,6 +79,18 @@ def create_compare_arguments(parser):
|
|
|
67
79
|
parser.add_argument(
|
|
68
80
|
"--running_platform", type=str, default="intel64-ubuntu22.04-redis-icx1"
|
|
69
81
|
)
|
|
82
|
+
parser.add_argument(
|
|
83
|
+
"--running_platform_baseline",
|
|
84
|
+
type=str,
|
|
85
|
+
default=None,
|
|
86
|
+
help="Platform for baseline data. If not specified, falls back to --running_platform",
|
|
87
|
+
)
|
|
88
|
+
parser.add_argument(
|
|
89
|
+
"--running_platform_comparison",
|
|
90
|
+
type=str,
|
|
91
|
+
default=None,
|
|
92
|
+
help="Platform for comparison data. If not specified, falls back to --running_platform",
|
|
93
|
+
)
|
|
70
94
|
parser.add_argument("--extra-filter", type=str, default=None)
|
|
71
95
|
parser.add_argument(
|
|
72
96
|
"--last_n",
|
|
@@ -251,6 +251,16 @@ def compare_command_logic(args, project_name, project_version):
|
|
|
251
251
|
testname_regex = args.testname_regex
|
|
252
252
|
auto_approve = args.auto_approve
|
|
253
253
|
running_platform = args.running_platform
|
|
254
|
+
|
|
255
|
+
# Handle separate baseline and comparison platform/environment arguments
|
|
256
|
+
# Fall back to general arguments if specific ones are not provided
|
|
257
|
+
running_platform_baseline = args.running_platform_baseline or args.running_platform
|
|
258
|
+
running_platform_comparison = (
|
|
259
|
+
args.running_platform_comparison or args.running_platform
|
|
260
|
+
)
|
|
261
|
+
triggering_env_baseline = args.triggering_env_baseline or args.triggering_env
|
|
262
|
+
triggering_env_comparison = args.triggering_env_comparison or args.triggering_env
|
|
263
|
+
|
|
254
264
|
baseline_target_version = args.baseline_target_version
|
|
255
265
|
comparison_target_version = args.comparison_target_version
|
|
256
266
|
baseline_target_branch = args.baseline_target_branch
|
|
@@ -262,10 +272,31 @@ def compare_command_logic(args, project_name, project_version):
|
|
|
262
272
|
baseline_hash = args.baseline_hash
|
|
263
273
|
comparison_hash = args.comparison_hash
|
|
264
274
|
|
|
265
|
-
|
|
275
|
+
# Log platform and environment information
|
|
276
|
+
if running_platform_baseline == running_platform_comparison:
|
|
277
|
+
if running_platform_baseline is not None:
|
|
278
|
+
logging.info(
|
|
279
|
+
"Using platform named: {} for both baseline and comparison.\n\n".format(
|
|
280
|
+
running_platform_baseline
|
|
281
|
+
)
|
|
282
|
+
)
|
|
283
|
+
else:
|
|
284
|
+
logging.info(
|
|
285
|
+
"Using platform named: {} for baseline and {} for comparison.\n\n".format(
|
|
286
|
+
running_platform_baseline, running_platform_comparison
|
|
287
|
+
)
|
|
288
|
+
)
|
|
289
|
+
|
|
290
|
+
if triggering_env_baseline == triggering_env_comparison:
|
|
291
|
+
logging.info(
|
|
292
|
+
"Using triggering environment: {} for both baseline and comparison.".format(
|
|
293
|
+
triggering_env_baseline
|
|
294
|
+
)
|
|
295
|
+
)
|
|
296
|
+
else:
|
|
266
297
|
logging.info(
|
|
267
|
-
"Using
|
|
268
|
-
|
|
298
|
+
"Using triggering environment: {} for baseline and {} for comparison.".format(
|
|
299
|
+
triggering_env_baseline, triggering_env_comparison
|
|
269
300
|
)
|
|
270
301
|
)
|
|
271
302
|
|
|
@@ -328,7 +359,8 @@ def compare_command_logic(args, project_name, project_version):
|
|
|
328
359
|
rts,
|
|
329
360
|
tf_github_org,
|
|
330
361
|
tf_github_repo,
|
|
331
|
-
|
|
362
|
+
triggering_env_baseline,
|
|
363
|
+
triggering_env_comparison,
|
|
332
364
|
metric_name,
|
|
333
365
|
comparison_branch,
|
|
334
366
|
baseline_branch,
|
|
@@ -352,7 +384,8 @@ def compare_command_logic(args, project_name, project_version):
|
|
|
352
384
|
to_date,
|
|
353
385
|
to_ts_ms,
|
|
354
386
|
use_metric_context_path,
|
|
355
|
-
|
|
387
|
+
running_platform_baseline,
|
|
388
|
+
running_platform_comparison,
|
|
356
389
|
baseline_target_version,
|
|
357
390
|
comparison_target_version,
|
|
358
391
|
baseline_hash,
|
|
@@ -383,11 +416,13 @@ def compare_command_logic(args, project_name, project_version):
|
|
|
383
416
|
pr_link,
|
|
384
417
|
regression_comment,
|
|
385
418
|
rts,
|
|
386
|
-
|
|
419
|
+
running_platform_baseline,
|
|
420
|
+
running_platform_comparison,
|
|
387
421
|
table_output,
|
|
388
422
|
tf_github_org,
|
|
389
423
|
tf_github_repo,
|
|
390
|
-
|
|
424
|
+
triggering_env_baseline,
|
|
425
|
+
triggering_env_comparison,
|
|
391
426
|
total_comparison_points,
|
|
392
427
|
total_improvements,
|
|
393
428
|
total_regressions,
|
|
@@ -423,11 +458,13 @@ def prepare_regression_comment(
|
|
|
423
458
|
pr_link,
|
|
424
459
|
regression_comment,
|
|
425
460
|
rts,
|
|
426
|
-
|
|
461
|
+
running_platform_baseline,
|
|
462
|
+
running_platform_comparison,
|
|
427
463
|
table_output,
|
|
428
464
|
tf_github_org,
|
|
429
465
|
tf_github_repo,
|
|
430
|
-
|
|
466
|
+
triggering_env_baseline,
|
|
467
|
+
triggering_env_comparison,
|
|
431
468
|
total_comparison_points,
|
|
432
469
|
total_improvements,
|
|
433
470
|
total_regressions,
|
|
@@ -441,9 +478,25 @@ def prepare_regression_comment(
|
|
|
441
478
|
if total_comparison_points > 0:
|
|
442
479
|
comment_body = "### Automated performance analysis summary\n\n"
|
|
443
480
|
comment_body += "This comment was automatically generated given there is performance data available.\n\n"
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
481
|
+
# Add platform information to comment
|
|
482
|
+
if running_platform_baseline == running_platform_comparison:
|
|
483
|
+
if running_platform_baseline is not None:
|
|
484
|
+
comment_body += "Using platform named: {} for both baseline and comparison.\n\n".format(
|
|
485
|
+
running_platform_baseline
|
|
486
|
+
)
|
|
487
|
+
else:
|
|
488
|
+
comment_body += "Using platform named: {} for baseline and {} for comparison.\n\n".format(
|
|
489
|
+
running_platform_baseline, running_platform_comparison
|
|
490
|
+
)
|
|
491
|
+
|
|
492
|
+
# Add triggering environment information to comment
|
|
493
|
+
if triggering_env_baseline == triggering_env_comparison:
|
|
494
|
+
comment_body += "Using triggering environment: {} for both baseline and comparison.\n\n".format(
|
|
495
|
+
triggering_env_baseline
|
|
496
|
+
)
|
|
497
|
+
else:
|
|
498
|
+
comment_body += "Using triggering environment: {} for baseline and {} for comparison.\n\n".format(
|
|
499
|
+
triggering_env_baseline, triggering_env_comparison
|
|
447
500
|
)
|
|
448
501
|
comparison_summary = "In summary:\n"
|
|
449
502
|
if total_stable > 0:
|
|
@@ -507,7 +560,7 @@ def prepare_regression_comment(
|
|
|
507
560
|
|
|
508
561
|
if is_actionable_pr:
|
|
509
562
|
zset_project_pull_request = get_project_compare_zsets(
|
|
510
|
-
|
|
563
|
+
triggering_env_baseline,
|
|
511
564
|
tf_github_org,
|
|
512
565
|
tf_github_repo,
|
|
513
566
|
)
|
|
@@ -516,16 +569,22 @@ def prepare_regression_comment(
|
|
|
516
569
|
zset_project_pull_request, comparison_branch
|
|
517
570
|
)
|
|
518
571
|
)
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
572
|
+
# Only add to Redis sorted set if comparison_branch is not None
|
|
573
|
+
if comparison_branch is not None:
|
|
574
|
+
_, start_time_ms, _ = get_start_time_vars()
|
|
575
|
+
res = rts.zadd(
|
|
576
|
+
zset_project_pull_request,
|
|
577
|
+
{comparison_branch: start_time_ms},
|
|
578
|
+
)
|
|
579
|
+
logging.info(
|
|
580
|
+
"Result of Populating the pull request performance ZSETs: {} with branch {}: {}".format(
|
|
581
|
+
zset_project_pull_request, comparison_branch, res
|
|
582
|
+
)
|
|
583
|
+
)
|
|
584
|
+
else:
|
|
585
|
+
logging.warning(
|
|
586
|
+
"Skipping Redis ZADD operation because comparison_branch is None"
|
|
527
587
|
)
|
|
528
|
-
)
|
|
529
588
|
|
|
530
589
|
if contains_regression_comment:
|
|
531
590
|
update_comment_if_needed(
|
|
@@ -587,7 +646,8 @@ def compute_regression_table(
|
|
|
587
646
|
rts,
|
|
588
647
|
tf_github_org,
|
|
589
648
|
tf_github_repo,
|
|
590
|
-
|
|
649
|
+
tf_triggering_env_baseline,
|
|
650
|
+
tf_triggering_env_comparison,
|
|
591
651
|
metric_name,
|
|
592
652
|
comparison_branch,
|
|
593
653
|
baseline_branch="unstable",
|
|
@@ -611,7 +671,8 @@ def compute_regression_table(
|
|
|
611
671
|
to_date=None,
|
|
612
672
|
to_ts_ms=None,
|
|
613
673
|
use_metric_context_path=None,
|
|
614
|
-
|
|
674
|
+
running_platform_baseline=None,
|
|
675
|
+
running_platform_comparison=None,
|
|
615
676
|
baseline_target_version=None,
|
|
616
677
|
comparison_target_version=None,
|
|
617
678
|
comparison_hash=None,
|
|
@@ -672,7 +733,9 @@ def compute_regression_table(
|
|
|
672
733
|
_,
|
|
673
734
|
_,
|
|
674
735
|
_,
|
|
675
|
-
) = get_overall_dashboard_keynames(
|
|
736
|
+
) = get_overall_dashboard_keynames(
|
|
737
|
+
tf_github_org, tf_github_repo, tf_triggering_env_baseline
|
|
738
|
+
)
|
|
676
739
|
test_names = []
|
|
677
740
|
used_key = testcases_setname
|
|
678
741
|
test_filter = "test_name"
|
|
@@ -728,9 +791,11 @@ def compute_regression_table(
|
|
|
728
791
|
simplify_table,
|
|
729
792
|
test_filter,
|
|
730
793
|
test_names,
|
|
731
|
-
|
|
794
|
+
tf_triggering_env_baseline,
|
|
795
|
+
tf_triggering_env_comparison,
|
|
732
796
|
verbose,
|
|
733
|
-
|
|
797
|
+
running_platform_baseline,
|
|
798
|
+
running_platform_comparison,
|
|
734
799
|
baseline_github_repo,
|
|
735
800
|
comparison_github_repo,
|
|
736
801
|
baseline_github_org,
|
|
@@ -1047,9 +1112,11 @@ def from_rts_to_regression_table(
|
|
|
1047
1112
|
simplify_table,
|
|
1048
1113
|
test_filter,
|
|
1049
1114
|
test_names,
|
|
1050
|
-
|
|
1115
|
+
tf_triggering_env_baseline,
|
|
1116
|
+
tf_triggering_env_comparison,
|
|
1051
1117
|
verbose,
|
|
1052
|
-
|
|
1118
|
+
running_platform_baseline=None,
|
|
1119
|
+
running_platform_comparison=None,
|
|
1053
1120
|
baseline_github_repo="redis",
|
|
1054
1121
|
comparison_github_repo="redis",
|
|
1055
1122
|
baseline_github_org="redis",
|
|
@@ -1109,19 +1176,21 @@ def from_rts_to_regression_table(
|
|
|
1109
1176
|
"{}={}".format(test_filter, test_name),
|
|
1110
1177
|
"deployment_name={}".format(baseline_deployment_name),
|
|
1111
1178
|
"github_repo={}".format(baseline_github_repo),
|
|
1112
|
-
"triggering_env={}".format(
|
|
1179
|
+
"triggering_env={}".format(tf_triggering_env_baseline),
|
|
1113
1180
|
]
|
|
1114
1181
|
if baseline_github_org != "":
|
|
1115
1182
|
filters_baseline.append(f"github_org={baseline_github_org}")
|
|
1116
|
-
if
|
|
1117
|
-
filters_baseline.append(
|
|
1183
|
+
if running_platform_baseline is not None:
|
|
1184
|
+
filters_baseline.append(
|
|
1185
|
+
"running_platform={}".format(running_platform_baseline)
|
|
1186
|
+
)
|
|
1118
1187
|
filters_comparison = [
|
|
1119
1188
|
"{}={}".format(by_str_comparison, comparison_str),
|
|
1120
1189
|
"metric={}".format(metric_name),
|
|
1121
1190
|
"{}={}".format(test_filter, test_name),
|
|
1122
1191
|
"deployment_name={}".format(comparison_deployment_name),
|
|
1123
1192
|
"github_repo={}".format(comparison_github_repo),
|
|
1124
|
-
"triggering_env={}".format(
|
|
1193
|
+
"triggering_env={}".format(tf_triggering_env_comparison),
|
|
1125
1194
|
]
|
|
1126
1195
|
if comparison_github_org != "":
|
|
1127
1196
|
filters_comparison.append(f"github_org={comparison_github_org}")
|
|
@@ -1129,8 +1198,10 @@ def from_rts_to_regression_table(
|
|
|
1129
1198
|
filters_baseline.append("hash==")
|
|
1130
1199
|
if "hash" not in by_str_comparison:
|
|
1131
1200
|
filters_comparison.append("hash==")
|
|
1132
|
-
if
|
|
1133
|
-
filters_comparison.append(
|
|
1201
|
+
if running_platform_comparison is not None:
|
|
1202
|
+
filters_comparison.append(
|
|
1203
|
+
"running_platform={}".format(running_platform_comparison)
|
|
1204
|
+
)
|
|
1134
1205
|
baseline_timeseries = rts.ts().queryindex(filters_baseline)
|
|
1135
1206
|
comparison_timeseries = rts.ts().queryindex(filters_comparison)
|
|
1136
1207
|
|
|
@@ -1302,30 +1373,61 @@ def from_rts_to_regression_table(
|
|
|
1302
1373
|
if baseline_v != "N/A" or comparison_v != "N/A":
|
|
1303
1374
|
detected_regression = False
|
|
1304
1375
|
detected_improvement = False
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
if
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1376
|
+
|
|
1377
|
+
# For higher-better metrics: negative change = regression, positive change = improvement
|
|
1378
|
+
# For lower-better metrics: positive change = regression, negative change = improvement
|
|
1379
|
+
if metric_mode == "higher-better":
|
|
1380
|
+
# Higher is better: negative change is bad (regression), positive change is good (improvement)
|
|
1381
|
+
if percentage_change < 0.0:
|
|
1382
|
+
if -waterline >= percentage_change:
|
|
1383
|
+
detected_regression = True
|
|
1384
|
+
total_regressions = total_regressions + 1
|
|
1385
|
+
note = note + f" {regression_str}"
|
|
1386
|
+
detected_regressions.append(test_name)
|
|
1387
|
+
elif percentage_change < -noise_waterline:
|
|
1388
|
+
if simplify_table is False:
|
|
1389
|
+
note = note + f" potential {regression_str}"
|
|
1390
|
+
else:
|
|
1391
|
+
if simplify_table is False:
|
|
1392
|
+
note = note + " No Change"
|
|
1393
|
+
|
|
1394
|
+
if percentage_change > 0.0:
|
|
1395
|
+
if percentage_change > waterline:
|
|
1396
|
+
detected_improvement = True
|
|
1397
|
+
total_improvements = total_improvements + 1
|
|
1398
|
+
note = note + f" {improvement_str}"
|
|
1399
|
+
elif percentage_change > noise_waterline:
|
|
1400
|
+
if simplify_table is False:
|
|
1401
|
+
note = note + f" potential {improvement_str}"
|
|
1402
|
+
else:
|
|
1403
|
+
if simplify_table is False:
|
|
1404
|
+
note = note + " No Change"
|
|
1405
|
+
else:
|
|
1406
|
+
# Lower is better: positive change is bad (regression), negative change is good (improvement)
|
|
1407
|
+
if percentage_change > 0.0:
|
|
1408
|
+
if percentage_change >= waterline:
|
|
1409
|
+
detected_regression = True
|
|
1410
|
+
total_regressions = total_regressions + 1
|
|
1411
|
+
note = note + f" {regression_str}"
|
|
1412
|
+
detected_regressions.append(test_name)
|
|
1413
|
+
elif percentage_change > noise_waterline:
|
|
1414
|
+
if simplify_table is False:
|
|
1415
|
+
note = note + f" potential {regression_str}"
|
|
1416
|
+
else:
|
|
1417
|
+
if simplify_table is False:
|
|
1418
|
+
note = note + " No Change"
|
|
1419
|
+
|
|
1420
|
+
if percentage_change < 0.0:
|
|
1421
|
+
if -percentage_change > waterline:
|
|
1422
|
+
detected_improvement = True
|
|
1423
|
+
total_improvements = total_improvements + 1
|
|
1424
|
+
note = note + f" {improvement_str}"
|
|
1425
|
+
elif -percentage_change > noise_waterline:
|
|
1426
|
+
if simplify_table is False:
|
|
1427
|
+
note = note + f" potential {improvement_str}"
|
|
1428
|
+
else:
|
|
1429
|
+
if simplify_table is False:
|
|
1430
|
+
note = note + " No Change"
|
|
1329
1431
|
|
|
1330
1432
|
for test_group in tested_groups:
|
|
1331
1433
|
if test_group not in group_change:
|
|
@@ -20,6 +20,12 @@ def create_client_runner_args(project_name):
|
|
|
20
20
|
description=project_name,
|
|
21
21
|
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
|
|
22
22
|
)
|
|
23
|
+
parser.add_argument(
|
|
24
|
+
"--version",
|
|
25
|
+
action="version",
|
|
26
|
+
version=project_name,
|
|
27
|
+
help="Show version information and exit",
|
|
28
|
+
)
|
|
23
29
|
parser.add_argument(
|
|
24
30
|
"--platform-name",
|
|
25
31
|
type=str,
|