redis-benchmarks-specification 0.1.95__py3-none-any.whl → 0.1.97__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__/github.py +11 -0
- redis_benchmarks_specification/__compare__/compare.py +110 -91
- redis_benchmarks_specification/__self_contained_coordinator__/args.py +5 -0
- redis_benchmarks_specification/__self_contained_coordinator__/self_contained_coordinator.py +212 -60
- {redis_benchmarks_specification-0.1.95.dist-info → redis_benchmarks_specification-0.1.97.dist-info}/METADATA +1 -1
- {redis_benchmarks_specification-0.1.95.dist-info → redis_benchmarks_specification-0.1.97.dist-info}/RECORD +9 -9
- {redis_benchmarks_specification-0.1.95.dist-info → redis_benchmarks_specification-0.1.97.dist-info}/LICENSE +0 -0
- {redis_benchmarks_specification-0.1.95.dist-info → redis_benchmarks_specification-0.1.97.dist-info}/WHEEL +0 -0
- {redis_benchmarks_specification-0.1.95.dist-info → redis_benchmarks_specification-0.1.97.dist-info}/entry_points.txt +0 -0
|
@@ -2,6 +2,17 @@ import logging
|
|
|
2
2
|
from github import Github
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
def check_regression_comment(comments):
|
|
6
|
+
res = False
|
|
7
|
+
pos = -1
|
|
8
|
+
for n, comment in enumerate(comments):
|
|
9
|
+
body = comment.body
|
|
10
|
+
if "Comparison between" in body and "Time Period from" in body:
|
|
11
|
+
res = True
|
|
12
|
+
pos = n
|
|
13
|
+
return res, pos
|
|
14
|
+
|
|
15
|
+
|
|
5
16
|
def generate_build_started_pr_comment(
|
|
6
17
|
build_datetime,
|
|
7
18
|
commit_datetime,
|
|
@@ -20,6 +20,7 @@ from redis_benchmarks_specification.__common__.github import (
|
|
|
20
20
|
update_comment_if_needed,
|
|
21
21
|
create_new_pr_comment,
|
|
22
22
|
check_github_available_and_actionable,
|
|
23
|
+
check_regression_comment,
|
|
23
24
|
)
|
|
24
25
|
from redis_benchmarks_specification.__compare__.args import create_compare_arguments
|
|
25
26
|
|
|
@@ -165,45 +166,9 @@ def compare_command_logic(args, project_name, project_version):
|
|
|
165
166
|
username=args.redistimeseries_user,
|
|
166
167
|
)
|
|
167
168
|
rts.ping()
|
|
168
|
-
default_baseline_branch =
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
logging.info(
|
|
172
|
-
"Loading configuration from defaults file: {}".format(
|
|
173
|
-
args.defaults_filename
|
|
174
|
-
)
|
|
175
|
-
)
|
|
176
|
-
with open(args.defaults_filename) as yaml_fd:
|
|
177
|
-
defaults_dict = yaml.safe_load(yaml_fd)
|
|
178
|
-
if "exporter" in defaults_dict:
|
|
179
|
-
exporter_dict = defaults_dict["exporter"]
|
|
180
|
-
if "comparison" in exporter_dict:
|
|
181
|
-
comparison_dict = exporter_dict["comparison"]
|
|
182
|
-
if "metrics" in comparison_dict:
|
|
183
|
-
metrics = comparison_dict["metrics"]
|
|
184
|
-
logging.info("Detected defaults metrics info. reading metrics")
|
|
185
|
-
default_metrics = []
|
|
186
|
-
|
|
187
|
-
for metric in metrics:
|
|
188
|
-
if metric.startswith("$."):
|
|
189
|
-
metric = metric[2:]
|
|
190
|
-
logging.info("Will use metric: {}".format(metric))
|
|
191
|
-
default_metrics.append(metric)
|
|
192
|
-
if len(default_metrics) == 1:
|
|
193
|
-
default_metrics_str = default_metrics[0]
|
|
194
|
-
if len(default_metrics) > 1:
|
|
195
|
-
default_metrics_str = "({})".format(
|
|
196
|
-
",".join(default_metrics)
|
|
197
|
-
)
|
|
198
|
-
logging.info("Default metrics: {}".format(default_metrics_str))
|
|
199
|
-
|
|
200
|
-
if "baseline-branch" in comparison_dict:
|
|
201
|
-
default_baseline_branch = comparison_dict["baseline-branch"]
|
|
202
|
-
logging.info(
|
|
203
|
-
"Detected baseline branch in defaults file. {}".format(
|
|
204
|
-
default_baseline_branch
|
|
205
|
-
)
|
|
206
|
-
)
|
|
169
|
+
default_baseline_branch, default_metrics_str = extract_default_branch_and_metric(
|
|
170
|
+
args.defaults_filename
|
|
171
|
+
)
|
|
207
172
|
|
|
208
173
|
tf_github_org = args.github_org
|
|
209
174
|
tf_github_repo = args.github_repo
|
|
@@ -300,25 +265,7 @@ def compare_command_logic(args, project_name, project_version):
|
|
|
300
265
|
) = check_github_available_and_actionable(
|
|
301
266
|
fn, github_token, pull_request, tf_github_org, tf_github_repo, verbose
|
|
302
267
|
)
|
|
303
|
-
|
|
304
|
-
grafana_dashboards_uids = {
|
|
305
|
-
"redisgraph": "SH9_rQYGz",
|
|
306
|
-
"redisbloom": "q4-5sRR7k",
|
|
307
|
-
"redisearch": "3Ejv2wZnk",
|
|
308
|
-
"redisjson": "UErSC0jGk",
|
|
309
|
-
"redistimeseries": "2WMw61UGz",
|
|
310
|
-
}
|
|
311
|
-
uid = None
|
|
312
|
-
if tf_github_repo.lower() in grafana_dashboards_uids:
|
|
313
|
-
uid = grafana_dashboards_uids[tf_github_repo.lower()]
|
|
314
|
-
grafana_link_base = None
|
|
315
|
-
if uid is not None:
|
|
316
|
-
grafana_link_base = "{}/{}".format(grafana_base_dashboard, uid)
|
|
317
|
-
logging.info(
|
|
318
|
-
"There is a grafana dashboard for this repo. Base link: {}".format(
|
|
319
|
-
grafana_link_base
|
|
320
|
-
)
|
|
321
|
-
)
|
|
268
|
+
grafana_link_base = "https://benchmarksredisio.grafana.net/d/1fWbtb7nz/experimental-oss-spec-benchmarks"
|
|
322
269
|
|
|
323
270
|
(
|
|
324
271
|
detected_regressions,
|
|
@@ -358,7 +305,71 @@ def compare_command_logic(args, project_name, project_version):
|
|
|
358
305
|
use_metric_context_path,
|
|
359
306
|
running_platform,
|
|
360
307
|
)
|
|
361
|
-
|
|
308
|
+
prepare_regression_comment(
|
|
309
|
+
auto_approve,
|
|
310
|
+
baseline_branch,
|
|
311
|
+
baseline_tag,
|
|
312
|
+
comparison_branch,
|
|
313
|
+
comparison_tag,
|
|
314
|
+
contains_regression_comment,
|
|
315
|
+
github_pr,
|
|
316
|
+
grafana_link_base,
|
|
317
|
+
is_actionable_pr,
|
|
318
|
+
old_regression_comment_body,
|
|
319
|
+
pr_link,
|
|
320
|
+
regression_comment,
|
|
321
|
+
rts,
|
|
322
|
+
running_platform,
|
|
323
|
+
table_output,
|
|
324
|
+
tf_github_org,
|
|
325
|
+
tf_github_repo,
|
|
326
|
+
tf_triggering_env,
|
|
327
|
+
total_comparison_points,
|
|
328
|
+
total_improvements,
|
|
329
|
+
total_regressions,
|
|
330
|
+
total_stable,
|
|
331
|
+
total_unstable,
|
|
332
|
+
verbose,
|
|
333
|
+
args.regressions_percent_lower_limit,
|
|
334
|
+
)
|
|
335
|
+
return (
|
|
336
|
+
detected_regressions,
|
|
337
|
+
"",
|
|
338
|
+
total_improvements,
|
|
339
|
+
total_regressions,
|
|
340
|
+
total_stable,
|
|
341
|
+
total_unstable,
|
|
342
|
+
total_comparison_points,
|
|
343
|
+
)
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
def prepare_regression_comment(
|
|
347
|
+
auto_approve,
|
|
348
|
+
baseline_branch,
|
|
349
|
+
baseline_tag,
|
|
350
|
+
comparison_branch,
|
|
351
|
+
comparison_tag,
|
|
352
|
+
contains_regression_comment,
|
|
353
|
+
github_pr,
|
|
354
|
+
grafana_link_base,
|
|
355
|
+
is_actionable_pr,
|
|
356
|
+
old_regression_comment_body,
|
|
357
|
+
pr_link,
|
|
358
|
+
regression_comment,
|
|
359
|
+
rts,
|
|
360
|
+
running_platform,
|
|
361
|
+
table_output,
|
|
362
|
+
tf_github_org,
|
|
363
|
+
tf_github_repo,
|
|
364
|
+
tf_triggering_env,
|
|
365
|
+
total_comparison_points,
|
|
366
|
+
total_improvements,
|
|
367
|
+
total_regressions,
|
|
368
|
+
total_stable,
|
|
369
|
+
total_unstable,
|
|
370
|
+
verbose,
|
|
371
|
+
regressions_percent_lower_limit,
|
|
372
|
+
):
|
|
362
373
|
if total_comparison_points > 0:
|
|
363
374
|
comment_body = "### Automated performance analysis summary\n\n"
|
|
364
375
|
comment_body += "This comment was automatically generated given there is performance data available.\n\n"
|
|
@@ -386,7 +397,7 @@ def compare_command_logic(args, project_name, project_version):
|
|
|
386
397
|
)
|
|
387
398
|
if total_regressions > 0:
|
|
388
399
|
comparison_summary += "- Detected a total of {} regressions bellow the regression water line {}.\n".format(
|
|
389
|
-
total_regressions,
|
|
400
|
+
total_regressions, regressions_percent_lower_limit
|
|
390
401
|
)
|
|
391
402
|
|
|
392
403
|
comment_body += comparison_summary
|
|
@@ -430,19 +441,6 @@ def compare_command_logic(args, project_name, project_version):
|
|
|
430
441
|
zset_project_pull_request, comparison_branch, res
|
|
431
442
|
)
|
|
432
443
|
)
|
|
433
|
-
user_input = "n"
|
|
434
|
-
html_url = "n/a"
|
|
435
|
-
(
|
|
436
|
-
baseline_str,
|
|
437
|
-
by_str_baseline,
|
|
438
|
-
comparison_str,
|
|
439
|
-
by_str_comparison,
|
|
440
|
-
) = get_by_strings(
|
|
441
|
-
baseline_branch,
|
|
442
|
-
comparison_branch,
|
|
443
|
-
baseline_tag,
|
|
444
|
-
comparison_tag,
|
|
445
|
-
)
|
|
446
444
|
|
|
447
445
|
if contains_regression_comment:
|
|
448
446
|
update_comment_if_needed(
|
|
@@ -457,26 +455,47 @@ def compare_command_logic(args, project_name, project_version):
|
|
|
457
455
|
|
|
458
456
|
else:
|
|
459
457
|
logging.error("There was no comparison points to produce a table...")
|
|
460
|
-
return (
|
|
461
|
-
detected_regressions,
|
|
462
|
-
comment_body,
|
|
463
|
-
total_improvements,
|
|
464
|
-
total_regressions,
|
|
465
|
-
total_stable,
|
|
466
|
-
total_unstable,
|
|
467
|
-
total_comparison_points,
|
|
468
|
-
)
|
|
469
458
|
|
|
470
459
|
|
|
471
|
-
def
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
460
|
+
def extract_default_branch_and_metric(defaults_filename):
|
|
461
|
+
default_baseline_branch = None
|
|
462
|
+
default_metrics_str = ""
|
|
463
|
+
if defaults_filename != "" and os.path.exists(defaults_filename):
|
|
464
|
+
logging.info(
|
|
465
|
+
"Loading configuration from defaults file: {}".format(defaults_filename)
|
|
466
|
+
)
|
|
467
|
+
with open(defaults_filename) as yaml_fd:
|
|
468
|
+
defaults_dict = yaml.safe_load(yaml_fd)
|
|
469
|
+
if "exporter" in defaults_dict:
|
|
470
|
+
exporter_dict = defaults_dict["exporter"]
|
|
471
|
+
if "comparison" in exporter_dict:
|
|
472
|
+
comparison_dict = exporter_dict["comparison"]
|
|
473
|
+
if "metrics" in comparison_dict:
|
|
474
|
+
metrics = comparison_dict["metrics"]
|
|
475
|
+
logging.info("Detected defaults metrics info. reading metrics")
|
|
476
|
+
default_metrics = []
|
|
477
|
+
|
|
478
|
+
for metric in metrics:
|
|
479
|
+
if metric.startswith("$."):
|
|
480
|
+
metric = metric[2:]
|
|
481
|
+
logging.info("Will use metric: {}".format(metric))
|
|
482
|
+
default_metrics.append(metric)
|
|
483
|
+
if len(default_metrics) == 1:
|
|
484
|
+
default_metrics_str = default_metrics[0]
|
|
485
|
+
if len(default_metrics) > 1:
|
|
486
|
+
default_metrics_str = "({})".format(
|
|
487
|
+
",".join(default_metrics)
|
|
488
|
+
)
|
|
489
|
+
logging.info("Default metrics: {}".format(default_metrics_str))
|
|
490
|
+
|
|
491
|
+
if "baseline-branch" in comparison_dict:
|
|
492
|
+
default_baseline_branch = comparison_dict["baseline-branch"]
|
|
493
|
+
logging.info(
|
|
494
|
+
"Detected baseline branch in defaults file. {}".format(
|
|
495
|
+
default_baseline_branch
|
|
496
|
+
)
|
|
497
|
+
)
|
|
498
|
+
return default_baseline_branch, default_metrics_str
|
|
480
499
|
|
|
481
500
|
|
|
482
501
|
def compute_regression_table(
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import argparse
|
|
2
|
+
import datetime
|
|
2
3
|
import os
|
|
3
4
|
from redis_benchmarks_specification.__common__.env import (
|
|
4
5
|
MACHINE_CPU_COUNT,
|
|
@@ -19,6 +20,10 @@ from redis_benchmarks_specification.__common__.env import (
|
|
|
19
20
|
PROFILERS_DEFAULT,
|
|
20
21
|
ALLOWED_PROFILERS,
|
|
21
22
|
)
|
|
23
|
+
from redis_benchmarks_specification.__compare__.args import (
|
|
24
|
+
START_TIME_NOW_UTC,
|
|
25
|
+
START_TIME_LAST_SIX_MONTHS_UTC,
|
|
26
|
+
)
|
|
22
27
|
|
|
23
28
|
PERFORMANCE_GH_TOKEN = os.getenv("PERFORMANCE_GH_TOKEN", None)
|
|
24
29
|
|
|
@@ -31,6 +31,7 @@ from redis_benchmarks_specification.__common__.github import (
|
|
|
31
31
|
update_comment_if_needed,
|
|
32
32
|
create_new_pr_comment,
|
|
33
33
|
generate_benchmark_started_pr_comment,
|
|
34
|
+
check_regression_comment,
|
|
34
35
|
)
|
|
35
36
|
from redis_benchmarks_specification.__common__.package import (
|
|
36
37
|
get_version_string,
|
|
@@ -42,8 +43,14 @@ from redis_benchmarks_specification.__common__.runner import (
|
|
|
42
43
|
exporter_datasink_common,
|
|
43
44
|
execute_init_commands,
|
|
44
45
|
)
|
|
46
|
+
from redis_benchmarks_specification.__compare__.compare import (
|
|
47
|
+
compute_regression_table,
|
|
48
|
+
prepare_regression_comment,
|
|
49
|
+
extract_default_branch_and_metric,
|
|
50
|
+
)
|
|
45
51
|
from redis_benchmarks_specification.__runner__.runner import (
|
|
46
52
|
print_results_table_stdout,
|
|
53
|
+
prepare_memtier_benchmark_parameters,
|
|
47
54
|
)
|
|
48
55
|
from redis_benchmarks_specification.__self_contained_coordinator__.args import (
|
|
49
56
|
create_self_contained_coordinator_args,
|
|
@@ -145,7 +152,7 @@ def main():
|
|
|
145
152
|
)
|
|
146
153
|
)
|
|
147
154
|
try:
|
|
148
|
-
|
|
155
|
+
gh_event_conn = redis.StrictRedis(
|
|
149
156
|
host=args.event_stream_host,
|
|
150
157
|
port=args.event_stream_port,
|
|
151
158
|
decode_responses=False, # dont decode due to binary archives
|
|
@@ -155,7 +162,7 @@ def main():
|
|
|
155
162
|
socket_connect_timeout=REDIS_SOCKET_TIMEOUT,
|
|
156
163
|
socket_keepalive=True,
|
|
157
164
|
)
|
|
158
|
-
|
|
165
|
+
gh_event_conn.ping()
|
|
159
166
|
except redis.exceptions.ConnectionError as e:
|
|
160
167
|
logging.error(
|
|
161
168
|
"Unable to connect to redis available at: {}:{} to read the event streams".format(
|
|
@@ -195,7 +202,7 @@ def main():
|
|
|
195
202
|
|
|
196
203
|
logging.info("checking build spec requirements")
|
|
197
204
|
running_platform = args.platform_name
|
|
198
|
-
build_runners_consumer_group_create(
|
|
205
|
+
build_runners_consumer_group_create(gh_event_conn, running_platform)
|
|
199
206
|
stream_id = None
|
|
200
207
|
docker_client = docker.from_env()
|
|
201
208
|
home = str(Path.home())
|
|
@@ -211,6 +218,10 @@ def main():
|
|
|
211
218
|
f"Using priority for test filters [{priority_lower_limit},{priority_upper_limit}]"
|
|
212
219
|
)
|
|
213
220
|
|
|
221
|
+
default_baseline_branch, default_metrics_str = extract_default_branch_and_metric(
|
|
222
|
+
args.defaults_filename
|
|
223
|
+
)
|
|
224
|
+
|
|
214
225
|
# TODO: confirm we do have enough cores to run the spec
|
|
215
226
|
# availabe_cpus = args.cpu_count
|
|
216
227
|
datasink_push_results_redistimeseries = args.datasink_push_results_redistimeseries
|
|
@@ -270,7 +281,7 @@ def main():
|
|
|
270
281
|
stream_id = args.consumer_start_id
|
|
271
282
|
while True:
|
|
272
283
|
_, stream_id, _, _ = self_contained_coordinator_blocking_read(
|
|
273
|
-
|
|
284
|
+
gh_event_conn,
|
|
274
285
|
datasink_push_results_redistimeseries,
|
|
275
286
|
docker_client,
|
|
276
287
|
home,
|
|
@@ -292,11 +303,13 @@ def main():
|
|
|
292
303
|
github_token,
|
|
293
304
|
priority_lower_limit,
|
|
294
305
|
priority_upper_limit,
|
|
306
|
+
default_baseline_branch,
|
|
307
|
+
default_metrics_str,
|
|
295
308
|
)
|
|
296
309
|
|
|
297
310
|
|
|
298
311
|
def self_contained_coordinator_blocking_read(
|
|
299
|
-
|
|
312
|
+
github_event_conn,
|
|
300
313
|
datasink_push_results_redistimeseries,
|
|
301
314
|
docker_client,
|
|
302
315
|
home,
|
|
@@ -312,12 +325,14 @@ def self_contained_coordinator_blocking_read(
|
|
|
312
325
|
redis_proc_start_port=6379,
|
|
313
326
|
consumer_pos=1,
|
|
314
327
|
docker_air_gap=False,
|
|
315
|
-
override_test_time=
|
|
328
|
+
override_test_time=1,
|
|
316
329
|
default_metrics=None,
|
|
317
330
|
arch="amd64",
|
|
318
331
|
github_token=None,
|
|
319
332
|
priority_lower_limit=0,
|
|
320
333
|
priority_upper_limit=10000,
|
|
334
|
+
default_baseline_branch="unstable",
|
|
335
|
+
default_metrics_str="ALL_STATS.Totals.Ops/sec",
|
|
321
336
|
):
|
|
322
337
|
num_process_streams = 0
|
|
323
338
|
num_process_test_suites = 0
|
|
@@ -330,7 +345,7 @@ def self_contained_coordinator_blocking_read(
|
|
|
330
345
|
get_runners_consumer_group_name(platform_name), consumer_name
|
|
331
346
|
)
|
|
332
347
|
)
|
|
333
|
-
newTestInfo =
|
|
348
|
+
newTestInfo = github_event_conn.xreadgroup(
|
|
334
349
|
get_runners_consumer_group_name(platform_name),
|
|
335
350
|
consumer_name,
|
|
336
351
|
{STREAM_KEYNAME_NEW_BUILD_EVENTS: stream_id},
|
|
@@ -345,7 +360,7 @@ def self_contained_coordinator_blocking_read(
|
|
|
345
360
|
overall_result,
|
|
346
361
|
total_test_suite_runs,
|
|
347
362
|
) = process_self_contained_coordinator_stream(
|
|
348
|
-
|
|
363
|
+
github_event_conn,
|
|
349
364
|
datasink_push_results_redistimeseries,
|
|
350
365
|
docker_client,
|
|
351
366
|
home,
|
|
@@ -361,17 +376,19 @@ def self_contained_coordinator_blocking_read(
|
|
|
361
376
|
redis_proc_start_port,
|
|
362
377
|
docker_air_gap,
|
|
363
378
|
"defaults.yml",
|
|
364
|
-
|
|
379
|
+
override_test_time,
|
|
365
380
|
default_metrics,
|
|
366
381
|
arch,
|
|
367
382
|
github_token,
|
|
368
383
|
priority_lower_limit,
|
|
369
384
|
priority_upper_limit,
|
|
385
|
+
default_baseline_branch,
|
|
386
|
+
default_metrics_str,
|
|
370
387
|
)
|
|
371
388
|
num_process_streams = num_process_streams + 1
|
|
372
389
|
num_process_test_suites = num_process_test_suites + total_test_suite_runs
|
|
373
390
|
if overall_result is True:
|
|
374
|
-
ack_reply =
|
|
391
|
+
ack_reply = github_event_conn.xack(
|
|
375
392
|
STREAM_KEYNAME_NEW_BUILD_EVENTS,
|
|
376
393
|
get_runners_consumer_group_name(platform_name),
|
|
377
394
|
stream_id,
|
|
@@ -393,34 +410,35 @@ def self_contained_coordinator_blocking_read(
|
|
|
393
410
|
return overall_result, stream_id, num_process_streams, num_process_test_suites
|
|
394
411
|
|
|
395
412
|
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
413
|
+
#
|
|
414
|
+
# def prepare_memtier_benchmark_parameters(
|
|
415
|
+
# clientconfig,
|
|
416
|
+
# full_benchmark_path,
|
|
417
|
+
# port,
|
|
418
|
+
# server,
|
|
419
|
+
# local_benchmark_output_filename,
|
|
420
|
+
# oss_cluster_api_enabled,
|
|
421
|
+
# ):
|
|
422
|
+
# benchmark_command = [
|
|
423
|
+
# full_benchmark_path,
|
|
424
|
+
# "--port",
|
|
425
|
+
# "{}".format(port),
|
|
426
|
+
# "--server",
|
|
427
|
+
# "{}".format(server),
|
|
428
|
+
# "--json-out-file",
|
|
429
|
+
# local_benchmark_output_filename,
|
|
430
|
+
# ]
|
|
431
|
+
# if oss_cluster_api_enabled is True:
|
|
432
|
+
# benchmark_command.append("--cluster-mode")
|
|
433
|
+
# benchmark_command_str = " ".join(benchmark_command)
|
|
434
|
+
# if "arguments" in clientconfig:
|
|
435
|
+
# benchmark_command_str = benchmark_command_str + " " + clientconfig["arguments"]
|
|
436
|
+
#
|
|
437
|
+
# return None, benchmark_command_str
|
|
420
438
|
|
|
421
439
|
|
|
422
440
|
def process_self_contained_coordinator_stream(
|
|
423
|
-
|
|
441
|
+
github_event_conn,
|
|
424
442
|
datasink_push_results_redistimeseries,
|
|
425
443
|
docker_client,
|
|
426
444
|
home,
|
|
@@ -436,21 +454,23 @@ def process_self_contained_coordinator_stream(
|
|
|
436
454
|
redis_proc_start_port=6379,
|
|
437
455
|
docker_air_gap=False,
|
|
438
456
|
defaults_filename="defaults.yml",
|
|
439
|
-
override_test_time=
|
|
457
|
+
override_test_time=0,
|
|
440
458
|
default_metrics=[],
|
|
441
459
|
arch="amd64",
|
|
442
460
|
github_token=None,
|
|
443
461
|
priority_lower_limit=0,
|
|
444
462
|
priority_upper_limit=10000,
|
|
463
|
+
default_baseline_branch="unstable",
|
|
464
|
+
default_metrics_str="ALL_STATS.Totals.Ops/sec",
|
|
445
465
|
):
|
|
446
466
|
stream_id = "n/a"
|
|
447
467
|
overall_result = False
|
|
448
468
|
total_test_suite_runs = 0
|
|
449
469
|
# github updates
|
|
450
470
|
is_actionable_pr = False
|
|
451
|
-
|
|
471
|
+
contains_benchmark_run_comment = False
|
|
452
472
|
github_pr = None
|
|
453
|
-
|
|
473
|
+
old_benchmark_run_comment_body = ""
|
|
454
474
|
pr_link = ""
|
|
455
475
|
regression_comment = None
|
|
456
476
|
pull_request = None
|
|
@@ -500,12 +520,12 @@ def process_self_contained_coordinator_stream(
|
|
|
500
520
|
verbose = True
|
|
501
521
|
fn = check_benchmark_running_comment
|
|
502
522
|
(
|
|
503
|
-
|
|
523
|
+
contains_benchmark_run_comment,
|
|
504
524
|
github_pr,
|
|
505
525
|
is_actionable_pr,
|
|
506
|
-
|
|
526
|
+
old_benchmark_run_comment_body,
|
|
507
527
|
pr_link,
|
|
508
|
-
|
|
528
|
+
benchmark_run_comment,
|
|
509
529
|
) = check_github_available_and_actionable(
|
|
510
530
|
fn, github_token, pull_request, "redis", "redis", verbose
|
|
511
531
|
)
|
|
@@ -546,13 +566,13 @@ def process_self_contained_coordinator_stream(
|
|
|
546
566
|
run_image, airgap_key
|
|
547
567
|
)
|
|
548
568
|
)
|
|
549
|
-
airgap_docker_image_bin =
|
|
569
|
+
airgap_docker_image_bin = github_event_conn.get(airgap_key)
|
|
550
570
|
images_loaded = docker_client.images.load(airgap_docker_image_bin)
|
|
551
571
|
logging.info("Successfully loaded images {}".format(images_loaded))
|
|
552
572
|
|
|
553
573
|
stream_time_ms = stream_id.split("-")[0]
|
|
554
574
|
zset_running_platform_benchmarks = f"ci.benchmarks.redis/ci/redis/redis:benchmarks:{running_platform}:zset"
|
|
555
|
-
res =
|
|
575
|
+
res = github_event_conn.zadd(
|
|
556
576
|
zset_running_platform_benchmarks,
|
|
557
577
|
{stream_id: stream_time_ms},
|
|
558
578
|
)
|
|
@@ -580,8 +600,10 @@ def process_self_contained_coordinator_stream(
|
|
|
580
600
|
benchmark_config,
|
|
581
601
|
test_name,
|
|
582
602
|
) = get_final_benchmark_config(None, stream, "")
|
|
583
|
-
|
|
584
|
-
|
|
603
|
+
github_event_conn.lpush(stream_test_list_pending, test_name)
|
|
604
|
+
github_event_conn.expire(
|
|
605
|
+
stream_test_list_pending, REDIS_BINS_EXPIRE_SECS
|
|
606
|
+
)
|
|
585
607
|
logging.info(
|
|
586
608
|
f"Added test named {test_name} to the pending test list in key {stream_test_list_pending}"
|
|
587
609
|
)
|
|
@@ -599,16 +621,16 @@ def process_self_contained_coordinator_stream(
|
|
|
599
621
|
)
|
|
600
622
|
# update on github if needed
|
|
601
623
|
if is_actionable_pr:
|
|
602
|
-
if
|
|
624
|
+
if contains_benchmark_run_comment:
|
|
603
625
|
update_comment_if_needed(
|
|
604
626
|
auto_approve_github,
|
|
605
627
|
comment_body,
|
|
606
|
-
|
|
607
|
-
|
|
628
|
+
old_benchmark_run_comment_body,
|
|
629
|
+
benchmark_run_comment,
|
|
608
630
|
verbose,
|
|
609
631
|
)
|
|
610
632
|
else:
|
|
611
|
-
|
|
633
|
+
benchmark_run_comment = create_new_pr_comment(
|
|
612
634
|
auto_approve_github, comment_body, github_pr, pr_link
|
|
613
635
|
)
|
|
614
636
|
|
|
@@ -621,9 +643,11 @@ def process_self_contained_coordinator_stream(
|
|
|
621
643
|
benchmark_config,
|
|
622
644
|
test_name,
|
|
623
645
|
) = get_final_benchmark_config(None, stream, "")
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
646
|
+
github_event_conn.lrem(stream_test_list_pending, 1, test_name)
|
|
647
|
+
github_event_conn.lpush(stream_test_list_running, test_name)
|
|
648
|
+
github_event_conn.expire(
|
|
649
|
+
stream_test_list_running, REDIS_BINS_EXPIRE_SECS
|
|
650
|
+
)
|
|
627
651
|
logging.info(
|
|
628
652
|
f"Added test named {test_name} to the pending test list in key {stream_test_list_running}"
|
|
629
653
|
)
|
|
@@ -703,7 +727,10 @@ def process_self_contained_coordinator_stream(
|
|
|
703
727
|
)
|
|
704
728
|
|
|
705
729
|
restore_build_artifacts_from_test_details(
|
|
706
|
-
build_artifacts,
|
|
730
|
+
build_artifacts,
|
|
731
|
+
github_event_conn,
|
|
732
|
+
temporary_dir,
|
|
733
|
+
testDetails,
|
|
707
734
|
)
|
|
708
735
|
mnt_point = "/mnt/redis/"
|
|
709
736
|
command = generate_standalone_redis_server_args(
|
|
@@ -821,13 +848,22 @@ def process_self_contained_coordinator_stream(
|
|
|
821
848
|
(
|
|
822
849
|
_,
|
|
823
850
|
benchmark_command_str,
|
|
851
|
+
arbitrary_command,
|
|
824
852
|
) = prepare_memtier_benchmark_parameters(
|
|
825
853
|
benchmark_config["clientconfig"],
|
|
826
854
|
full_benchmark_path,
|
|
827
855
|
redis_proc_start_port,
|
|
828
856
|
"localhost",
|
|
857
|
+
None,
|
|
829
858
|
local_benchmark_output_filename,
|
|
830
|
-
|
|
859
|
+
False,
|
|
860
|
+
False,
|
|
861
|
+
False,
|
|
862
|
+
None,
|
|
863
|
+
None,
|
|
864
|
+
None,
|
|
865
|
+
None,
|
|
866
|
+
override_test_time,
|
|
831
867
|
)
|
|
832
868
|
|
|
833
869
|
client_container_image = extract_client_container_image(
|
|
@@ -915,7 +951,7 @@ def process_self_contained_coordinator_stream(
|
|
|
915
951
|
tf_github_repo,
|
|
916
952
|
git_hash,
|
|
917
953
|
overall_tabular_data_map,
|
|
918
|
-
|
|
954
|
+
github_event_conn,
|
|
919
955
|
setup_name,
|
|
920
956
|
start_time_ms,
|
|
921
957
|
start_time_str,
|
|
@@ -1143,11 +1179,13 @@ def process_self_contained_coordinator_stream(
|
|
|
1143
1179
|
|
|
1144
1180
|
overall_result &= test_result
|
|
1145
1181
|
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1182
|
+
github_event_conn.lrem(stream_test_list_running, 1, test_name)
|
|
1183
|
+
github_event_conn.lpush(stream_test_list_completed, test_name)
|
|
1184
|
+
github_event_conn.expire(
|
|
1185
|
+
stream_test_list_completed, REDIS_BINS_EXPIRE_SECS
|
|
1186
|
+
)
|
|
1149
1187
|
if test_result is False:
|
|
1150
|
-
|
|
1188
|
+
github_event_conn.lpush(stream_test_list_failed, test_name)
|
|
1151
1189
|
failed_tests = failed_tests + 1
|
|
1152
1190
|
logging.warning(
|
|
1153
1191
|
f"updating key {stream_test_list_failed} with the failed test: {test_name}. Total failed tests {failed_tests}."
|
|
@@ -1175,12 +1213,126 @@ def process_self_contained_coordinator_stream(
|
|
|
1175
1213
|
update_comment_if_needed(
|
|
1176
1214
|
auto_approve_github,
|
|
1177
1215
|
comment_body,
|
|
1216
|
+
old_benchmark_run_comment_body,
|
|
1217
|
+
benchmark_run_comment,
|
|
1218
|
+
verbose,
|
|
1219
|
+
)
|
|
1220
|
+
logging.info(
|
|
1221
|
+
f"Updated github comment with latest test info {regression_comment.html_url}"
|
|
1222
|
+
)
|
|
1223
|
+
|
|
1224
|
+
###########################
|
|
1225
|
+
# regression part
|
|
1226
|
+
###########################
|
|
1227
|
+
fn = check_regression_comment
|
|
1228
|
+
(
|
|
1229
|
+
contains_regression_comment,
|
|
1230
|
+
github_pr,
|
|
1231
|
+
is_actionable_pr,
|
|
1178
1232
|
old_regression_comment_body,
|
|
1233
|
+
pr_link,
|
|
1179
1234
|
regression_comment,
|
|
1235
|
+
) = check_github_available_and_actionable(
|
|
1236
|
+
fn,
|
|
1237
|
+
github_token,
|
|
1238
|
+
pull_request,
|
|
1239
|
+
tf_github_org,
|
|
1240
|
+
tf_github_repo,
|
|
1180
1241
|
verbose,
|
|
1181
1242
|
)
|
|
1182
1243
|
logging.info(
|
|
1183
|
-
f"
|
|
1244
|
+
f"Preparing regression info for the data available"
|
|
1245
|
+
)
|
|
1246
|
+
print_improvements_only = False
|
|
1247
|
+
print_regressions_only = False
|
|
1248
|
+
skip_unstable = False
|
|
1249
|
+
regressions_percent_lower_limit = 10.0
|
|
1250
|
+
simplify_table = False
|
|
1251
|
+
testname_regex = ""
|
|
1252
|
+
test = ""
|
|
1253
|
+
last_n_baseline = 1
|
|
1254
|
+
last_n_comparison = 31
|
|
1255
|
+
use_metric_context_path = False
|
|
1256
|
+
baseline_tag = None
|
|
1257
|
+
baseline_deployment_name = "oss-standalone"
|
|
1258
|
+
comparison_deployment_name = "oss-standalone"
|
|
1259
|
+
metric_name = "ALL_STATS.Totals.Ops/sec"
|
|
1260
|
+
metric_mode = "higher-better"
|
|
1261
|
+
to_date = datetime.datetime.utcnow()
|
|
1262
|
+
from_date = to_date - datetime.timedelta(days=180)
|
|
1263
|
+
baseline_branch = default_baseline_branch
|
|
1264
|
+
comparison_tag = git_branch
|
|
1265
|
+
comparison_branch = git_version
|
|
1266
|
+
to_ts_ms = None
|
|
1267
|
+
from_ts_ms = None
|
|
1268
|
+
|
|
1269
|
+
(
|
|
1270
|
+
detected_regressions,
|
|
1271
|
+
table_output,
|
|
1272
|
+
total_improvements,
|
|
1273
|
+
total_regressions,
|
|
1274
|
+
total_stable,
|
|
1275
|
+
total_unstable,
|
|
1276
|
+
total_comparison_points,
|
|
1277
|
+
) = compute_regression_table(
|
|
1278
|
+
datasink_conn,
|
|
1279
|
+
tf_github_org,
|
|
1280
|
+
tf_github_repo,
|
|
1281
|
+
tf_triggering_env,
|
|
1282
|
+
metric_name,
|
|
1283
|
+
comparison_branch,
|
|
1284
|
+
baseline_branch,
|
|
1285
|
+
baseline_tag,
|
|
1286
|
+
comparison_tag,
|
|
1287
|
+
baseline_deployment_name,
|
|
1288
|
+
comparison_deployment_name,
|
|
1289
|
+
print_improvements_only,
|
|
1290
|
+
print_regressions_only,
|
|
1291
|
+
skip_unstable,
|
|
1292
|
+
regressions_percent_lower_limit,
|
|
1293
|
+
simplify_table,
|
|
1294
|
+
test,
|
|
1295
|
+
testname_regex,
|
|
1296
|
+
verbose,
|
|
1297
|
+
last_n_baseline,
|
|
1298
|
+
last_n_comparison,
|
|
1299
|
+
metric_mode,
|
|
1300
|
+
from_date,
|
|
1301
|
+
from_ts_ms,
|
|
1302
|
+
to_date,
|
|
1303
|
+
to_ts_ms,
|
|
1304
|
+
use_metric_context_path,
|
|
1305
|
+
running_platform,
|
|
1306
|
+
)
|
|
1307
|
+
auto_approve = True
|
|
1308
|
+
grafana_link_base = "https://benchmarksredisio.grafana.net/d/1fWbtb7nz/experimental-oss-spec-benchmarks"
|
|
1309
|
+
|
|
1310
|
+
prepare_regression_comment(
|
|
1311
|
+
auto_approve,
|
|
1312
|
+
baseline_branch,
|
|
1313
|
+
baseline_tag,
|
|
1314
|
+
comparison_branch,
|
|
1315
|
+
comparison_tag,
|
|
1316
|
+
contains_regression_comment,
|
|
1317
|
+
github_pr,
|
|
1318
|
+
grafana_link_base,
|
|
1319
|
+
is_actionable_pr,
|
|
1320
|
+
old_regression_comment_body,
|
|
1321
|
+
pr_link,
|
|
1322
|
+
regression_comment,
|
|
1323
|
+
datasink_conn,
|
|
1324
|
+
running_platform,
|
|
1325
|
+
table_output,
|
|
1326
|
+
tf_github_org,
|
|
1327
|
+
tf_github_repo,
|
|
1328
|
+
tf_triggering_env,
|
|
1329
|
+
total_comparison_points,
|
|
1330
|
+
total_improvements,
|
|
1331
|
+
total_regressions,
|
|
1332
|
+
total_stable,
|
|
1333
|
+
total_unstable,
|
|
1334
|
+
verbose,
|
|
1335
|
+
regressions_percent_lower_limit,
|
|
1184
1336
|
)
|
|
1185
1337
|
logging.info(
|
|
1186
1338
|
f"Added test named {test_name} to the completed test list in key {stream_test_list_completed}"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: redis-benchmarks-specification
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.97
|
|
4
4
|
Summary: 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.
|
|
5
5
|
Author: filipecosta90
|
|
6
6
|
Author-email: filipecosta.90@gmail.com
|
|
@@ -13,19 +13,19 @@ redis_benchmarks_specification/__cli__/stats.py,sha256=wahzZRbpfokv8dQU8O4BH5JFr
|
|
|
13
13
|
redis_benchmarks_specification/__common__/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
14
|
redis_benchmarks_specification/__common__/builder_schema.py,sha256=LW00BSz_LXa83wbgRFylOCyRMMH4-3YpWgYh2hevOFM,5693
|
|
15
15
|
redis_benchmarks_specification/__common__/env.py,sha256=l58AH5LC2jQcyPRJA4ue_4kMloOewcqnLvkLWfzph_A,3119
|
|
16
|
-
redis_benchmarks_specification/__common__/github.py,sha256=
|
|
16
|
+
redis_benchmarks_specification/__common__/github.py,sha256=_1Cwzzgm7dcWgUwUCKkSXn0MIU5QM9z7MMeMoFI73Js,10401
|
|
17
17
|
redis_benchmarks_specification/__common__/package.py,sha256=4uVt1BAZ999LV2rZkq--Tk6otAVIf9YR3g3KGeUpiW4,834
|
|
18
18
|
redis_benchmarks_specification/__common__/runner.py,sha256=6x1L8UAo-gmxLMcsUU4FGQ5OLV08fqygDnoVZ1rVUVQ,6642
|
|
19
19
|
redis_benchmarks_specification/__common__/spec.py,sha256=3hvfAb7RuAsqB_PNEo_-iuOtgz1ZCWe3ouMwS5Mw54A,1002
|
|
20
20
|
redis_benchmarks_specification/__compare__/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
|
|
21
21
|
redis_benchmarks_specification/__compare__/args.py,sha256=71-pYjlbTQNAXQMbAiet898yhWRIplBBNU5USQqFar4,5341
|
|
22
|
-
redis_benchmarks_specification/__compare__/compare.py,sha256=
|
|
22
|
+
redis_benchmarks_specification/__compare__/compare.py,sha256=ClVHnKZtKS0cEccQiZzxBtthY9xe7DSnFUOgT6ZhtsE,36838
|
|
23
23
|
redis_benchmarks_specification/__init__.py,sha256=YQIEx2sLPPA0JR9OuCuMNMNtm-f_gqDKgzvNJnkGNKY,491
|
|
24
24
|
redis_benchmarks_specification/__runner__/__init__.py,sha256=l-G1z-t6twUgi8QLueqoTQLvJmv3hJoEYskGm6H7L6M,83
|
|
25
25
|
redis_benchmarks_specification/__runner__/args.py,sha256=lYvbPd_3ppHZv4f2sRwXcF-fcBrwRSn3H2RMmNVkojY,7221
|
|
26
26
|
redis_benchmarks_specification/__runner__/runner.py,sha256=ty-SzkeW4JGJD3p5DBsTTqKtY5iIOGan311stCCCjsA,47859
|
|
27
27
|
redis_benchmarks_specification/__self_contained_coordinator__/__init__.py,sha256=l-G1z-t6twUgi8QLueqoTQLvJmv3hJoEYskGm6H7L6M,83
|
|
28
|
-
redis_benchmarks_specification/__self_contained_coordinator__/args.py,sha256=
|
|
28
|
+
redis_benchmarks_specification/__self_contained_coordinator__/args.py,sha256=unQxatbVlkQmIQwDnoVmruNdmbhTkxDJs0FETc67Ovg,5910
|
|
29
29
|
redis_benchmarks_specification/__self_contained_coordinator__/artifacts.py,sha256=rTVzBzPNDz7myIkiI6ToEh29Jo53Bi5a_zNALscSvKI,840
|
|
30
30
|
redis_benchmarks_specification/__self_contained_coordinator__/build_info.py,sha256=psZrbt7hdAm3jyOKLr-UqaXllu2-Pzd8r6rjRja8CTU,2211
|
|
31
31
|
redis_benchmarks_specification/__self_contained_coordinator__/clients.py,sha256=voL6zP3RenpZ1A7JKGVkvEWVXI9KYwmnSgVJr6l8o-4,710
|
|
@@ -33,7 +33,7 @@ redis_benchmarks_specification/__self_contained_coordinator__/cpuset.py,sha256=s
|
|
|
33
33
|
redis_benchmarks_specification/__self_contained_coordinator__/docker.py,sha256=iivxZ55vL2kVHHkqVbXY2ftvxvceqH_Zw079KLCv9N8,2507
|
|
34
34
|
redis_benchmarks_specification/__self_contained_coordinator__/prepopulation.py,sha256=ajhpzxsBy6tiHrO79gEIKQYxZR-Us6B4rC6NYg1EZjM,2875
|
|
35
35
|
redis_benchmarks_specification/__self_contained_coordinator__/runners.py,sha256=Ul8UoxvWRxCVWmyaCBadpLMDOVEoNSp-A9KMPtPmUwM,28483
|
|
36
|
-
redis_benchmarks_specification/__self_contained_coordinator__/self_contained_coordinator.py,sha256=
|
|
36
|
+
redis_benchmarks_specification/__self_contained_coordinator__/self_contained_coordinator.py,sha256=VIptC7ATesc2pFkpGVXpCJvBU4xYeNUgjEW0xMZhwUU,66692
|
|
37
37
|
redis_benchmarks_specification/__setups__/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
38
38
|
redis_benchmarks_specification/__setups__/topologies.py,sha256=xQ1IJkcTji_ZjLiJd3vOxZpvbNtBLZw9cPkw5hGJKHU,481
|
|
39
39
|
redis_benchmarks_specification/__spec__/__init__.py,sha256=l-G1z-t6twUgi8QLueqoTQLvJmv3hJoEYskGm6H7L6M,83
|
|
@@ -150,8 +150,8 @@ redis_benchmarks_specification/test-suites/memtier_benchmark-2keys-set-10-100-el
|
|
|
150
150
|
redis_benchmarks_specification/test-suites/memtier_benchmark-2keys-stream-5-entries-xread-all-entries-pipeline-10.yml,sha256=RSkNgV5SsjdkXhM0mifi2GlwIxtiHR8N3u-ieI23BoQ,1126
|
|
151
151
|
redis_benchmarks_specification/test-suites/memtier_benchmark-2keys-stream-5-entries-xread-all-entries.yml,sha256=w7-dOIU-eATHXCvJbSeih6Vt54oygtkXKskQdzCll3o,1100
|
|
152
152
|
redis_benchmarks_specification/test-suites/template.txt,sha256=qrci_94QV9bPUJe0cL8lsUaQmX5Woz-jT-pDF0629AE,423
|
|
153
|
-
redis_benchmarks_specification-0.1.
|
|
154
|
-
redis_benchmarks_specification-0.1.
|
|
155
|
-
redis_benchmarks_specification-0.1.
|
|
156
|
-
redis_benchmarks_specification-0.1.
|
|
157
|
-
redis_benchmarks_specification-0.1.
|
|
153
|
+
redis_benchmarks_specification-0.1.97.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
154
|
+
redis_benchmarks_specification-0.1.97.dist-info/METADATA,sha256=6Yi-upoOFYufExA4YSKZNTfnV5hAwRFENGQU2WEelco,22482
|
|
155
|
+
redis_benchmarks_specification-0.1.97.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
|
|
156
|
+
redis_benchmarks_specification-0.1.97.dist-info/entry_points.txt,sha256=x5WBXCZsnDRTZxV7SBGmC65L2k-ygdDOxV8vuKN00Nk,715
|
|
157
|
+
redis_benchmarks_specification-0.1.97.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|