redis-benchmarks-specification 0.1.72__py3-none-any.whl → 0.1.74__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.

Files changed (49) hide show
  1. redis_benchmarks_specification/__builder__/builder.py +2 -0
  2. redis_benchmarks_specification/__cli__/args.py +6 -0
  3. redis_benchmarks_specification/__cli__/cli.py +5 -1
  4. redis_benchmarks_specification/__compare__/__init__.py +5 -0
  5. redis_benchmarks_specification/__compare__/args.py +135 -0
  6. redis_benchmarks_specification/__compare__/compare.py +1153 -0
  7. redis_benchmarks_specification/__runner__/runner.py +120 -59
  8. redis_benchmarks_specification/__self_contained_coordinator__/self_contained_coordinator.py +21 -10
  9. redis_benchmarks_specification/test-suites/create-re-string.py +286 -0
  10. redis_benchmarks_specification/test-suites/generate.py +108 -0
  11. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-hash-hincrby.yml +1 -1
  12. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-200KiB-values.yml +37 -0
  13. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-20KiB-values.yml +37 -0
  14. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-2MB-values.yml +37 -0
  15. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-200KiB.yml +33 -0
  16. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-20KiB.yml +33 -0
  17. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-2MB.yml +33 -0
  18. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-100-elements-zrangebyscore-all-elements-long-scores.yml +2 -2
  19. redis_benchmarks_specification/test-suites/string/memtier_benchmark-100Kkeys-load-string200c-with-20KiB-values-pipeline-10.yml +20 -0
  20. redis_benchmarks_specification/test-suites/string/memtier_benchmark-100Kkeys-load-string200c-with-20KiB-values.yml +20 -0
  21. redis_benchmarks_specification/test-suites/string/memtier_benchmark-100Kkeys-load-string50c-with-20KiB-values-pipeline-10.yml +20 -0
  22. redis_benchmarks_specification/test-suites/string/memtier_benchmark-100Kkeys-load-string50c-with-20KiB-values.yml +20 -0
  23. redis_benchmarks_specification/test-suites/string/memtier_benchmark-100Kkeys-string-setget200c-20KiB-pipeline-10.yml +26 -0
  24. redis_benchmarks_specification/test-suites/string/memtier_benchmark-100Kkeys-string-setget200c-20KiB.yml +26 -0
  25. redis_benchmarks_specification/test-suites/string/memtier_benchmark-100Kkeys-string-setget50c-20KiB-pipeline-10.yml +26 -0
  26. redis_benchmarks_specification/test-suites/string/memtier_benchmark-100Kkeys-string-setget50c-20KiB.yml +26 -0
  27. redis_benchmarks_specification/test-suites/string/memtier_benchmark-1Mkeys-load-string200c-with-100B-values-pipeline-10.yml +20 -0
  28. redis_benchmarks_specification/test-suites/string/memtier_benchmark-1Mkeys-load-string200c-with-100B-values.yml +20 -0
  29. redis_benchmarks_specification/test-suites/string/memtier_benchmark-1Mkeys-load-string200c-with-1KiB-values-pipeline-10.yml +20 -0
  30. redis_benchmarks_specification/test-suites/string/memtier_benchmark-1Mkeys-load-string200c-with-1KiB-values.yml +20 -0
  31. redis_benchmarks_specification/test-suites/string/memtier_benchmark-1Mkeys-load-string50c-with-100B-values-pipeline-10.yml +20 -0
  32. redis_benchmarks_specification/test-suites/string/memtier_benchmark-1Mkeys-load-string50c-with-100B-values.yml +20 -0
  33. redis_benchmarks_specification/test-suites/string/memtier_benchmark-1Mkeys-load-string50c-with-1KiB-values-pipeline-10.yml +20 -0
  34. redis_benchmarks_specification/test-suites/string/memtier_benchmark-1Mkeys-load-string50c-with-1KiB-values.yml +20 -0
  35. redis_benchmarks_specification/test-suites/string/memtier_benchmark-1Mkeys-string-mget-1KiB.yml +27 -0
  36. redis_benchmarks_specification/test-suites/string/memtier_benchmark-1Mkeys-string-setget200c-100B-pipeline-10.yml +26 -0
  37. redis_benchmarks_specification/test-suites/string/memtier_benchmark-1Mkeys-string-setget200c-100B.yml +26 -0
  38. redis_benchmarks_specification/test-suites/string/memtier_benchmark-1Mkeys-string-setget200c-1KiB-pipeline-10.yml +26 -0
  39. redis_benchmarks_specification/test-suites/string/memtier_benchmark-1Mkeys-string-setget200c-1KiB.yml +26 -0
  40. redis_benchmarks_specification/test-suites/string/memtier_benchmark-1Mkeys-string-setget50c-100B-pipeline-10.yml +26 -0
  41. redis_benchmarks_specification/test-suites/string/memtier_benchmark-1Mkeys-string-setget50c-100B.yml +26 -0
  42. redis_benchmarks_specification/test-suites/string/memtier_benchmark-1Mkeys-string-setget50c-1KiB-pipeline-10.yml +26 -0
  43. redis_benchmarks_specification/test-suites/string/memtier_benchmark-1Mkeys-string-setget50c-1KiB.yml +26 -0
  44. redis_benchmarks_specification/test-suites/template.txt +16 -0
  45. {redis_benchmarks_specification-0.1.72.dist-info → redis_benchmarks_specification-0.1.74.dist-info}/METADATA +2 -1
  46. {redis_benchmarks_specification-0.1.72.dist-info → redis_benchmarks_specification-0.1.74.dist-info}/RECORD +49 -12
  47. {redis_benchmarks_specification-0.1.72.dist-info → redis_benchmarks_specification-0.1.74.dist-info}/WHEEL +1 -1
  48. {redis_benchmarks_specification-0.1.72.dist-info → redis_benchmarks_specification-0.1.74.dist-info}/entry_points.txt +1 -0
  49. {redis_benchmarks_specification-0.1.72.dist-info → redis_benchmarks_specification-0.1.74.dist-info}/LICENSE +0 -0
@@ -353,6 +353,8 @@ def builder_process_stream(
353
353
  "{}_len_bytes".format(artifact)
354
354
  ] = bin_artifact_len
355
355
  result = True
356
+ if b"platform" in testDetails:
357
+ build_stream_fields["platform"] = testDetails[b"platform"]
356
358
  if result is True:
357
359
  stream_id = conn.xadd(
358
360
  STREAM_KEYNAME_NEW_BUILD_EVENTS, build_stream_fields
@@ -130,4 +130,10 @@ def spec_cli_args(parser):
130
130
  default=-1,
131
131
  help="Use the last N samples. by default will use all available values",
132
132
  )
133
+ parser.add_argument(
134
+ "--platform",
135
+ type=str,
136
+ default="",
137
+ help="Only trigger tests on the specified platform.",
138
+ )
133
139
  return parser
@@ -197,6 +197,8 @@ def trigger_tests_cli_command_logic(args, project_name, project_version):
197
197
  logging.info(
198
198
  "Will trigger {} distinct tests {}.".format(len(commits), by_description)
199
199
  )
200
+ if args.platform:
201
+ logging.info("Will trigger tests only for platform {}".format(args.platform))
200
202
 
201
203
  hash_regexp = args.hash_regexp
202
204
  if hash_regexp == ".*":
@@ -229,7 +231,7 @@ def trigger_tests_cli_command_logic(args, project_name, project_version):
229
231
  )
230
232
  filtered_hash_commits.append(cdict)
231
233
 
232
- if True: # args.dry_run is False:
234
+ if args.dry_run is False:
233
235
  conn = redis.StrictRedis(
234
236
  host=args.redis_host,
235
237
  port=args.redis_port,
@@ -250,6 +252,8 @@ def trigger_tests_cli_command_logic(args, project_name, project_version):
250
252
  ) = get_commit_dict_from_sha(
251
253
  cdict["git_hash"], "redis", "redis", cdict, True, args.gh_token
252
254
  )
255
+ if args.platform:
256
+ commit_dict["platform"] = args.platform
253
257
  if result is True:
254
258
  stream_id = "n/a"
255
259
  if args.dry_run is False:
@@ -0,0 +1,5 @@
1
+ # Apache License Version 2.0
2
+ #
3
+ # Copyright (c) 2021., Redis Labs Modules
4
+ # All rights reserved.
5
+ #
@@ -0,0 +1,135 @@
1
+ # Apache License Version 2.0
2
+ #
3
+ # Copyright (c) 2021., Redis Labs Modules
4
+ # All rights reserved.
5
+ #
6
+
7
+ # environment variables
8
+ import datetime
9
+ import os
10
+
11
+
12
+ def get_start_time_vars(start_time=None):
13
+ if start_time is None:
14
+ start_time = datetime.datetime.utcnow()
15
+ start_time_ms = int(
16
+ (start_time - datetime.datetime(1970, 1, 1)).total_seconds() * 1000
17
+ )
18
+ start_time_str = start_time.strftime("%Y-%m-%d-%H-%M-%S")
19
+ return start_time, start_time_ms, start_time_str
20
+
21
+
22
+ PERFORMANCE_GH_TOKEN = os.getenv("PERFORMANCE_GH_TOKEN", None)
23
+ PERFORMANCE_RTS_PUSH = bool(int(os.getenv("PUSH_RTS", "0")))
24
+
25
+
26
+ _, NOW_UTC, _ = get_start_time_vars()
27
+ LAST_MONTH_UTC = NOW_UTC - (31 * 24 * 60 * 60 * 1000)
28
+ START_TIME_NOW_UTC, _, _ = get_start_time_vars()
29
+ START_TIME_LAST_SIX_MONTHS_UTC = START_TIME_NOW_UTC - datetime.timedelta(days=180)
30
+
31
+
32
+ def create_compare_arguments(parser):
33
+ parser.add_argument(
34
+ "--test",
35
+ type=str,
36
+ default="",
37
+ help="specify a test (or a comma separated list of tests) to use for comparison. If none is specified by default will use all of them.",
38
+ )
39
+ parser.add_argument(
40
+ "--defaults_filename",
41
+ type=str,
42
+ default="defaults.yml",
43
+ help="specify the defaults file containing spec topologies, common metric extractions,etc...",
44
+ )
45
+ parser.add_argument("--github_repo", type=str, default="redis")
46
+ parser.add_argument("--github_org", type=str, default="redis")
47
+ parser.add_argument("--triggering_env", type=str, default="ci")
48
+ parser.add_argument("--github_token", type=str, default=PERFORMANCE_GH_TOKEN)
49
+ parser.add_argument("--pull-request", type=str, default=None, nargs="?", const="")
50
+ parser.add_argument("--deployment_name", type=str, default="oss-standalone")
51
+ parser.add_argument("--deployment_type", type=str, default="oss-standalone")
52
+ parser.add_argument("--baseline_deployment_name", type=str, default="")
53
+ parser.add_argument("--comparison_deployment_name", type=str, default="")
54
+ parser.add_argument("--metric_name", type=str, default="ALL_STATS.Totals.Ops/sec")
55
+ parser.add_argument(
56
+ "--running_platform", type=str, default="intel64-ubuntu22.04-redis-icx1"
57
+ )
58
+ parser.add_argument("--extra-filter", type=str, default=None)
59
+ parser.add_argument(
60
+ "--last_n",
61
+ type=int,
62
+ default=-1,
63
+ help="Use the last N samples for each time-serie. by default will use all available values",
64
+ )
65
+ parser.add_argument(
66
+ "--last_n_baseline",
67
+ type=int,
68
+ default=7,
69
+ help="Use the last N samples for each time-serie. by default will use last 7 available values",
70
+ )
71
+ parser.add_argument(
72
+ "--last_n_comparison",
73
+ type=int,
74
+ default=1,
75
+ help="Use the last N samples for each time-serie. by default will use last value only",
76
+ )
77
+ parser.add_argument(
78
+ "--from-date",
79
+ type=lambda s: datetime.datetime.strptime(s, "%Y-%m-%d"),
80
+ default=START_TIME_LAST_SIX_MONTHS_UTC,
81
+ )
82
+ parser.add_argument(
83
+ "--to-date",
84
+ type=lambda s: datetime.datetime.strptime(s, "%Y-%m-%d"),
85
+ default=START_TIME_NOW_UTC,
86
+ )
87
+ parser.add_argument(
88
+ "--metric_mode",
89
+ type=str,
90
+ default="higher-better",
91
+ help="either 'lower-better' or 'higher-better'",
92
+ )
93
+ parser.add_argument("--baseline-branch", type=str, default=None, required=False)
94
+ parser.add_argument("--baseline-tag", type=str, default=None, required=False)
95
+ parser.add_argument("--comparison-branch", type=str, default=None, required=False)
96
+ parser.add_argument("--comparison-tag", type=str, default=None, required=False)
97
+ parser.add_argument("--print-regressions-only", type=bool, default=False)
98
+ parser.add_argument("--print-improvements-only", type=bool, default=False)
99
+ parser.add_argument("--skip-unstable", type=bool, default=False)
100
+ parser.add_argument("--verbose", type=bool, default=False)
101
+ parser.add_argument("--simple-table", type=bool, default=False)
102
+ parser.add_argument("--use_metric_context_path", type=bool, default=False)
103
+ parser.add_argument("--testname_regex", type=str, default=".*", required=False)
104
+ parser.add_argument(
105
+ "--regressions-percent-lower-limit",
106
+ type=float,
107
+ default=5.0,
108
+ help="Only consider regressions with a percentage over the defined limit. (0-100)",
109
+ )
110
+ parser.add_argument(
111
+ "--redistimeseries_host", type=str, default="benchmarks.redislabs.com"
112
+ )
113
+ parser.add_argument("--redistimeseries_port", type=int, default=12011)
114
+ parser.add_argument("--redistimeseries_pass", type=str, default=None)
115
+ parser.add_argument("--redistimeseries_user", type=str, default=None)
116
+ parser.add_argument(
117
+ "--from_timestamp",
118
+ default=None,
119
+ help="The minimum period to use for the the value fetching",
120
+ )
121
+ parser.add_argument("--to_timestamp", default=None)
122
+
123
+ parser.add_argument(
124
+ "--grafana_base_dashboard",
125
+ type=str,
126
+ default="https://benchmarksrediscom.grafana.net/d/",
127
+ )
128
+ parser.add_argument(
129
+ "--auto-approve",
130
+ required=False,
131
+ default=False,
132
+ action="store_true",
133
+ help="Skip interactive approval of changes to github before applying.",
134
+ )
135
+ return parser