redis-benchmarks-specification 0.1.209__py3-none-any.whl → 0.1.211__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 (121) hide show
  1. redis_benchmarks_specification/__builder__/builder.py +130 -64
  2. redis_benchmarks_specification/__cli__/args.py +13 -1
  3. redis_benchmarks_specification/__cli__/cli.py +67 -3
  4. redis_benchmarks_specification/__common__/env.py +1 -1
  5. redis_benchmarks_specification/__common__/github.py +7 -11
  6. redis_benchmarks_specification/__common__/runner.py +15 -3
  7. redis_benchmarks_specification/__common__/timeseries.py +1551 -0
  8. redis_benchmarks_specification/__compare__/compare.py +0 -1
  9. redis_benchmarks_specification/__runner__/runner.py +20 -6
  10. redis_benchmarks_specification/__self_contained_coordinator__/args.py +0 -5
  11. redis_benchmarks_specification/__self_contained_coordinator__/artifacts.py +13 -12
  12. redis_benchmarks_specification/__self_contained_coordinator__/build_info.py +5 -3
  13. redis_benchmarks_specification/__self_contained_coordinator__/docker.py +2 -2
  14. redis_benchmarks_specification/__self_contained_coordinator__/prepopulation.py +4 -1
  15. redis_benchmarks_specification/__self_contained_coordinator__/runners.py +6 -2
  16. redis_benchmarks_specification/__self_contained_coordinator__/self_contained_coordinator.py +153 -52
  17. redis_benchmarks_specification/test-suites/memtier_benchmark-10Mkeys-load-hash-5-fields-with-1000B-values-pipeline-10.yml +1 -0
  18. redis_benchmarks_specification/test-suites/memtier_benchmark-10Mkeys-load-hash-5-fields-with-1000B-values.yml +1 -0
  19. redis_benchmarks_specification/test-suites/memtier_benchmark-10Mkeys-load-hash-5-fields-with-100B-values-pipeline-10.yml +1 -0
  20. redis_benchmarks_specification/test-suites/memtier_benchmark-10Mkeys-load-hash-5-fields-with-100B-values.yml +1 -0
  21. redis_benchmarks_specification/test-suites/memtier_benchmark-10Mkeys-load-hash-5-fields-with-10B-values-pipeline-10.yml +1 -0
  22. redis_benchmarks_specification/test-suites/memtier_benchmark-10Mkeys-load-hash-5-fields-with-10B-values.yml +1 -0
  23. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-100B-expire-use-case.yml +1 -0
  24. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-10B-expire-use-case.yml +1 -0
  25. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-1KiB-expire-use-case.yml +1 -0
  26. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-4KiB-expire-use-case.yml +1 -0
  27. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-bitmap-getbit-pipeline-10.yml +1 -0
  28. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-generic-exists-pipeline-10.yml +1 -0
  29. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-generic-expire-pipeline-10.yml +1 -0
  30. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-generic-expireat-pipeline-10.yml +1 -0
  31. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-generic-pexpire-pipeline-10.yml +1 -0
  32. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-generic-scan-pipeline-10.yml +1 -0
  33. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-generic-touch-pipeline-10.yml +1 -0
  34. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-generic-ttl-pipeline-10.yml +1 -0
  35. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-hash-hexists.yml +1 -0
  36. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-hash-hget-hgetall-hkeys-hvals-with-100B-values.yml +1 -0
  37. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-hash-hincrby.yml +1 -0
  38. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-hash-hmget-5-fields-with-100B-values-pipeline-10.yml +1 -0
  39. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-hash-transactions-multi-exec-pipeline-20.yml +1 -0
  40. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-list-lpop-rpop-with-100B-values.yml +1 -0
  41. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-list-lpop-rpop-with-10B-values.yml +1 -0
  42. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-list-lpop-rpop-with-1KiB-values.yml +1 -0
  43. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-hash-5-fields-with-1000B-values-pipeline-10.yml +1 -0
  44. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-hash-5-fields-with-1000B-values.yml +1 -0
  45. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-hash-hmset-5-fields-with-1000B-values.yml +1 -0
  46. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-list-with-100B-values.yml +1 -0
  47. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-list-with-10B-values.yml +1 -0
  48. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-list-with-1KiB-values.yml +1 -0
  49. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-stream-1-fields-with-100B-values-pipeline-10.yml +1 -0
  50. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-stream-1-fields-with-100B-values.yml +1 -0
  51. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-stream-5-fields-with-100B-values-pipeline-10.yml +1 -0
  52. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-stream-5-fields-with-100B-values.yml +1 -0
  53. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-100B-values-pipeline-10.yml +1 -0
  54. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-100B-values.yml +2 -5
  55. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-10B-values-pipeline-10.yml +1 -0
  56. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-10B-values.yml +1 -0
  57. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-1KiB-values.yml +1 -0
  58. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-200KiB-values.yml +2 -5
  59. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-20KiB-values.yml +2 -5
  60. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-2MB-values.yml +2 -5
  61. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-zset-with-10-elements-double-score.yml +1 -0
  62. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-zset-with-10-elements-int-score.yml +1 -0
  63. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-decr.yml +1 -0
  64. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-100B-pipeline-10.yml +1 -0
  65. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-100B.yml +1 -0
  66. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-10B-pipeline-10.yml +1 -0
  67. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-10B.yml +1 -0
  68. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-1KiB-pipeline-10.yml +1 -0
  69. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-1KiB.yml +1 -0
  70. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-200KiB.yml +1 -0
  71. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-20KiB.yml +1 -0
  72. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-2MB.yml +1 -0
  73. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-mget-1KiB.yml +1 -0
  74. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-geo-60M-elements-geodist-pipeline-10.yml +1 -0
  75. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-geo-60M-elements-geodist.yml +1 -0
  76. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-geo-60M-elements-geohash-pipeline-10.yml +1 -0
  77. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-geo-60M-elements-geohash.yml +1 -0
  78. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-geo-60M-elements-geopos-pipeline-10.yml +1 -0
  79. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-geo-60M-elements-geopos.yml +1 -0
  80. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-geo-60M-elements-geosearch-fromlonlat-bybox.yml +1 -0
  81. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-geo-60M-elements-geosearch-fromlonlat-pipeline-10.yml +1 -0
  82. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-geo-60M-elements-geosearch-fromlonlat.yml +1 -0
  83. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-10-elements-lrange-all-elements.yml +1 -0
  84. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-100-elements-lrange-all-elements.yml +1 -0
  85. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-1K-elements-lrange-all-elements.yml +1 -0
  86. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-pfadd-4KB-values-pipeline-10.yml +1 -0
  87. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-10-elements-smembers-pipeline-10.yml +1 -0
  88. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-10-elements-smembers.yml +1 -0
  89. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-10-elements-smismember.yml +1 -0
  90. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-100-elements-smembers.yml +1 -0
  91. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-100-elements-smismember.yml +1 -0
  92. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-1K-elements-smembers.yml +1 -0
  93. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-200K-elements-sadd-constant.yml +1 -0
  94. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-2M-elements-sadd-increasing.yml +1 -0
  95. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zincrby-1M-elements-pipeline-1.yml +1 -0
  96. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zrank-1M-elements-pipeline-1.yml +1 -0
  97. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zrem-5M-elements-pipeline-1.yml +1 -0
  98. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zrevrangebyscore-256K-elements-pipeline-1.yml +1 -0
  99. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zrevrank-1M-elements-pipeline-1.yml +1 -0
  100. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-10-elements-zrange-all-elements-long-scores.yml +1 -0
  101. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-10-elements-zrange-all-elements.yml +1 -0
  102. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-100-elements-zrange-all-elements.yml +1 -0
  103. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-100-elements-zrangebyscore-all-elements-long-scores.yml +1 -0
  104. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-100-elements-zrangebyscore-all-elements.yml +1 -0
  105. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-1K-elements-zrange-all-elements.yml +1 -0
  106. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-1M-elements-zcard-pipeline-10.yml +1 -0
  107. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-1M-elements-zrevrange-5-elements.yml +1 -0
  108. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-1M-elements-zscore-pipeline-10.yml +1 -0
  109. redis_benchmarks_specification/test-suites/memtier_benchmark-2keys-lua-eval-hset-expire.yml +1 -0
  110. redis_benchmarks_specification/test-suites/memtier_benchmark-2keys-lua-evalsha-hset-expire.yml +1 -0
  111. redis_benchmarks_specification/test-suites/memtier_benchmark-2keys-set-10-100-elements-sdiff.yml +1 -0
  112. redis_benchmarks_specification/test-suites/memtier_benchmark-2keys-set-10-100-elements-sinter.yml +1 -0
  113. redis_benchmarks_specification/test-suites/memtier_benchmark-2keys-set-10-100-elements-sunion.yml +1 -0
  114. redis_benchmarks_specification/test-suites/memtier_benchmark-2keys-stream-5-entries-xread-all-entries-pipeline-10.yml +1 -0
  115. redis_benchmarks_specification/test-suites/memtier_benchmark-2keys-stream-5-entries-xread-all-entries.yml +1 -0
  116. redis_benchmarks_specification/test-suites/template.txt +1 -0
  117. {redis_benchmarks_specification-0.1.209.dist-info → redis_benchmarks_specification-0.1.211.dist-info}/METADATA +12 -5
  118. {redis_benchmarks_specification-0.1.209.dist-info → redis_benchmarks_specification-0.1.211.dist-info}/RECORD +121 -120
  119. {redis_benchmarks_specification-0.1.209.dist-info → redis_benchmarks_specification-0.1.211.dist-info}/WHEEL +1 -1
  120. {redis_benchmarks_specification-0.1.209.dist-info → redis_benchmarks_specification-0.1.211.dist-info}/LICENSE +0 -0
  121. {redis_benchmarks_specification-0.1.209.dist-info → redis_benchmarks_specification-0.1.211.dist-info}/entry_points.txt +0 -0
@@ -248,7 +248,6 @@ def compare_command_logic(args, project_name, project_version):
248
248
  testname_regex = args.testname_regex
249
249
  auto_approve = args.auto_approve
250
250
  running_platform = args.running_platform
251
- grafana_base_dashboard = args.grafana_base_dashboard
252
251
 
253
252
  if running_platform is not None:
254
253
  logging.info(
@@ -211,7 +211,7 @@ def prepare_memtier_benchmark_parameters(
211
211
  server,
212
212
  password,
213
213
  local_benchmark_output_filename,
214
- oss_cluster_api_enabled,
214
+ oss_cluster_api_enabled=False,
215
215
  tls_enabled=False,
216
216
  tls_skip_verify=False,
217
217
  tls_cert=None,
@@ -382,6 +382,7 @@ def process_self_contained_coordinator_stream(
382
382
  defaults_filename = args.defaults_filename
383
383
  override_test_runs = args.override_test_runs
384
384
  (
385
+ _,
385
386
  _,
386
387
  default_metrics,
387
388
  _,
@@ -396,7 +397,7 @@ def process_self_contained_coordinator_stream(
396
397
 
397
398
  with open(test_file, "r") as stream:
398
399
  _, benchmark_config, test_name = get_final_benchmark_config(
399
- None, stream, ""
400
+ None, None, stream, ""
400
401
  )
401
402
 
402
403
  if tls_enabled:
@@ -410,6 +411,7 @@ def process_self_contained_coordinator_stream(
410
411
  for topology_spec_name in benchmark_config["redis-topologies"]:
411
412
  test_result = False
412
413
  benchmark_tool_global = ""
414
+ full_result_path = None
413
415
  try:
414
416
  current_cpu_pos = args.cpuset_start_pos
415
417
  temporary_dir_client = tempfile.mkdtemp(dir=home)
@@ -756,7 +758,10 @@ def process_self_contained_coordinator_stream(
756
758
  profiler_frequency = 99
757
759
 
758
760
  # start the profile
759
- (profiler_name, profilers_map,) = profilers_start_if_required(
761
+ (
762
+ profiler_name,
763
+ profilers_map,
764
+ ) = profilers_start_if_required(
760
765
  profilers_enabled,
761
766
  profilers_list,
762
767
  redis_pids,
@@ -821,7 +826,10 @@ def process_self_contained_coordinator_stream(
821
826
  benchmark_end_time, benchmark_start_time
822
827
  )
823
828
  )
824
- (_, overall_tabular_data_map,) = profilers_stop_if_required(
829
+ (
830
+ _,
831
+ overall_tabular_data_map,
832
+ ) = profilers_stop_if_required(
825
833
  datasink_push_results_redistimeseries,
826
834
  benchmark_duration_seconds,
827
835
  collection_summary_str,
@@ -1067,7 +1075,10 @@ def print_results_table_stdout(
1067
1075
  cpu_usage=None,
1068
1076
  ):
1069
1077
  # check which metrics to extract
1070
- (_, metrics,) = merge_default_and_config_metrics(
1078
+ (
1079
+ _,
1080
+ metrics,
1081
+ ) = merge_default_and_config_metrics(
1071
1082
  benchmark_config,
1072
1083
  default_metrics,
1073
1084
  None,
@@ -1092,7 +1103,10 @@ def prepare_overall_total_test_results(
1092
1103
  benchmark_config, default_metrics, results_dict, test_name, overall_results_matrix
1093
1104
  ):
1094
1105
  # check which metrics to extract
1095
- (_, metrics,) = merge_default_and_config_metrics(
1106
+ (
1107
+ _,
1108
+ metrics,
1109
+ ) = merge_default_and_config_metrics(
1096
1110
  benchmark_config,
1097
1111
  default_metrics,
1098
1112
  None,
@@ -1,5 +1,4 @@
1
1
  import argparse
2
- import datetime
3
2
  import os
4
3
  from redis_benchmarks_specification.__common__.env import (
5
4
  MACHINE_CPU_COUNT,
@@ -20,10 +19,6 @@ from redis_benchmarks_specification.__common__.env import (
20
19
  PROFILERS_DEFAULT,
21
20
  ALLOWED_PROFILERS,
22
21
  )
23
- from redis_benchmarks_specification.__compare__.args import (
24
- START_TIME_NOW_UTC,
25
- START_TIME_LAST_SIX_MONTHS_UTC,
26
- )
27
22
 
28
23
  PERFORMANCE_GH_TOKEN = os.getenv("PERFORMANCE_GH_TOKEN", None)
29
24
 
@@ -6,18 +6,19 @@ def restore_build_artifacts_from_test_details(
6
6
  build_artifacts, conn, temporary_dir, testDetails
7
7
  ):
8
8
  for build_artifact in build_artifacts:
9
- buffer_key = testDetails["{}".format(build_artifact).encode()]
10
- logging.info(
11
- "Reading artifact binary {} from key {}".format(build_artifact, buffer_key)
12
- )
13
- buffer = bytes(conn.get(buffer_key))
14
- artifact_fname = "{}/{}".format(temporary_dir, build_artifact)
15
- with open(artifact_fname, "wb") as fd:
16
- fd.write(buffer)
17
- os.chmod(artifact_fname, 755)
18
- # TODO: re-enable
19
- # if build_artifact == "redis-server":
20
- # redis_server_path = artifact_fname
9
+ build_artifact_key = "{}".format(build_artifact).encode()
10
+ if build_artifact_key in testDetails:
11
+ buffer_key = testDetails[build_artifact_key]
12
+ logging.info(
13
+ "Reading artifact binary {} from key {}".format(
14
+ build_artifact, buffer_key
15
+ )
16
+ )
17
+ buffer = bytes(conn.get(buffer_key))
18
+ artifact_fname = "{}/{}".format(temporary_dir, build_artifact)
19
+ with open(artifact_fname, "wb") as fd:
20
+ fd.write(buffer)
21
+ os.chmod(artifact_fname, 755)
21
22
 
22
23
  logging.info(
23
24
  "Successfully restored {} into {}".format(build_artifact, artifact_fname)
@@ -10,11 +10,13 @@ def extract_build_info_from_streamdata(testDetails):
10
10
  arch = "amd64"
11
11
  use_git_timestamp = False
12
12
  git_timestamp_ms = None
13
- metadata = None
13
+ metadata = {}
14
14
  build_variant_name = None
15
15
  fields = [fieldname.decode() for fieldname in testDetails.keys()]
16
- logging.info("Fields on stream {}".format(fields))
17
- git_hash = testDetails[b"git_hash"]
16
+ logging.info("Fields on stream {}".format(testDetails))
17
+ git_hash = None
18
+ if b"git_hash" in testDetails:
19
+ git_hash = testDetails[b"git_hash"].decode()
18
20
  if b"use_git_timestamp" in testDetails:
19
21
  use_git_timestamp = bool(testDetails[b"use_git_timestamp"].decode())
20
22
  if b"git_timestamp_ms" in testDetails:
@@ -18,9 +18,9 @@ def generate_standalone_redis_server_args(
18
18
  "no",
19
19
  "--port",
20
20
  "{}".format(port),
21
- "--dir",
22
- dbdir,
23
21
  ]
22
+ if dbdir != "":
23
+ command.extend(["--dbdir", dbdir])
24
24
  if configuration_parameters is not None:
25
25
  for parameter, parameter_value in configuration_parameters.items():
26
26
  if parameter not in added_params:
@@ -43,7 +43,10 @@ def data_prepopulation_step(
43
43
  full_benchmark_path = "/usr/local/bin/{}".format(preload_tool)
44
44
  client_mnt_point = "/mnt/client/"
45
45
  if "memtier_benchmark" in preload_tool:
46
- (_, preload_command_str,) = prepare_memtier_benchmark_parameters(
46
+ (
47
+ _,
48
+ preload_command_str,
49
+ ) = prepare_memtier_benchmark_parameters(
47
50
  benchmark_config["dbconfig"]["preload_tool"],
48
51
  full_benchmark_path,
49
52
  port,
@@ -120,6 +120,7 @@ def process_self_contained_coordinator_stream(
120
120
  stream_id = "n/a"
121
121
  overall_result = False
122
122
  total_test_suite_runs = 0
123
+ full_result_path = None
123
124
  try:
124
125
  stream_id, testDetails = newTestInfo[0][1][0]
125
126
  stream_id = stream_id.decode()
@@ -163,7 +164,7 @@ def process_self_contained_coordinator_stream(
163
164
 
164
165
  with open(test_file, "r") as stream:
165
166
  result, benchmark_config, test_name = get_final_benchmark_config(
166
- None, stream, ""
167
+ None, None, stream, ""
167
168
  )
168
169
  if result is False:
169
170
  logging.error(
@@ -456,7 +457,10 @@ def process_self_contained_coordinator_stream(
456
457
  )
457
458
  r.shutdown(save=False)
458
459
 
459
- (_, overall_tabular_data_map,) = profilers_stop_if_required(
460
+ (
461
+ _,
462
+ overall_tabular_data_map,
463
+ ) = profilers_stop_if_required(
460
464
  datasink_push_results_redistimeseries,
461
465
  benchmark_duration_seconds,
462
466
  collection_summary_str,
@@ -11,6 +11,7 @@ import redis
11
11
  import os
12
12
  from pathlib import Path
13
13
  import sys
14
+ import time
14
15
 
15
16
  from docker.models.containers import Container
16
17
  from redisbench_admin.profilers.profilers_local import (
@@ -43,6 +44,9 @@ from redis_benchmarks_specification.__common__.runner import (
43
44
  exporter_datasink_common,
44
45
  execute_init_commands,
45
46
  )
47
+ from redis_benchmarks_specification.__common__.timeseries import (
48
+ datasink_profile_tabular_data,
49
+ )
46
50
  from redis_benchmarks_specification.__compare__.compare import (
47
51
  compute_regression_table,
48
52
  prepare_regression_comment,
@@ -72,9 +76,7 @@ from redisbench_admin.run.common import (
72
76
  prepare_benchmark_parameters,
73
77
  )
74
78
  from redisbench_admin.run.grafana import generate_artifacts_table_grafana_redis
75
- from redisbench_admin.run.redistimeseries import (
76
- datasink_profile_tabular_data,
77
- )
79
+
78
80
  from redisbench_admin.run.run import calculate_client_tool_duration_and_check
79
81
  from redisbench_admin.utils.benchmark_config import (
80
82
  get_final_benchmark_config,
@@ -229,6 +231,7 @@ def main():
229
231
 
230
232
  defaults_filename = args.defaults_filename
231
233
  (
234
+ _,
232
235
  _,
233
236
  default_metrics,
234
237
  _,
@@ -308,6 +311,12 @@ def main():
308
311
  )
309
312
 
310
313
 
314
+ def check_health(container):
315
+ logging.info(container.attrs["State"])
316
+ health_status = container.attrs["State"].get("Health", {}).get("Status")
317
+ return health_status
318
+
319
+
311
320
  def self_contained_coordinator_blocking_read(
312
321
  github_event_conn,
313
322
  datasink_push_results_redistimeseries,
@@ -333,6 +342,8 @@ def self_contained_coordinator_blocking_read(
333
342
  priority_upper_limit=10000,
334
343
  default_baseline_branch="unstable",
335
344
  default_metrics_str="ALL_STATS.Totals.Ops/sec",
345
+ docker_keep_env=False,
346
+ restore_build_artifacts_default=True,
336
347
  ):
337
348
  num_process_streams = 0
338
349
  num_process_test_suites = 0
@@ -384,6 +395,8 @@ def self_contained_coordinator_blocking_read(
384
395
  priority_upper_limit,
385
396
  default_baseline_branch,
386
397
  default_metrics_str,
398
+ docker_keep_env,
399
+ restore_build_artifacts_default,
387
400
  )
388
401
  num_process_streams = num_process_streams + 1
389
402
  num_process_test_suites = num_process_test_suites + total_test_suite_runs
@@ -397,7 +410,7 @@ def self_contained_coordinator_blocking_read(
397
410
  ack_reply = ack_reply.decode()
398
411
  if ack_reply == "1" or ack_reply == 1:
399
412
  logging.info(
400
- "Sucessfully acknowledge build variation stream with id {}.".format(
413
+ "Sucessfully acknowledge BENCHMARK variation stream with id {}.".format(
401
414
  stream_id
402
415
  )
403
416
  )
@@ -452,7 +465,7 @@ def process_self_contained_coordinator_stream(
452
465
  grafana_profile_dashboard="",
453
466
  cpuset_start_pos=0,
454
467
  redis_proc_start_port=6379,
455
- docker_air_gap=False,
468
+ default_docker_air_gap=False,
456
469
  defaults_filename="defaults.yml",
457
470
  override_test_time=0,
458
471
  default_metrics=[],
@@ -462,6 +475,8 @@ def process_self_contained_coordinator_stream(
462
475
  priority_upper_limit=10000,
463
476
  default_baseline_branch="unstable",
464
477
  default_metrics_str="ALL_STATS.Totals.Ops/sec",
478
+ docker_keep_env=False,
479
+ restore_build_artifacts_default=True,
465
480
  ):
466
481
  stream_id = "n/a"
467
482
  overall_result = False
@@ -475,12 +490,17 @@ def process_self_contained_coordinator_stream(
475
490
  regression_comment = None
476
491
  pull_request = None
477
492
  auto_approve_github = True
493
+ # defaults
494
+ default_github_org = "redis"
495
+ default_github_repo = "redis"
496
+ restore_build_artifacts = restore_build_artifacts_default
497
+
478
498
  try:
479
499
  stream_id, testDetails = newTestInfo[0][1][0]
480
500
  stream_id = stream_id.decode()
481
501
  logging.info("Received work . Stream id {}.".format(stream_id))
482
502
 
483
- if b"git_hash" in testDetails:
503
+ if b"run_image" in testDetails:
484
504
  (
485
505
  build_variant_name,
486
506
  metadata,
@@ -493,6 +513,55 @@ def process_self_contained_coordinator_stream(
493
513
  git_timestamp_ms,
494
514
  run_arch,
495
515
  ) = extract_build_info_from_streamdata(testDetails)
516
+ tf_github_org = default_github_org
517
+ if b"github_org" in testDetails:
518
+ tf_github_org = testDetails[b"github_org"].decode()
519
+ logging.info(
520
+ f"detected a github_org definition on the streamdata: {tf_github_org}. Overriding the default one: {default_github_org}"
521
+ )
522
+ tf_github_repo = default_github_repo
523
+ if b"github_repo" in testDetails:
524
+ tf_github_repo = testDetails[b"github_repo"].decode()
525
+ logging.info(
526
+ f"detected a github_org definition on the streamdata: {tf_github_repo}. Overriding the default one: {default_github_repo}"
527
+ )
528
+
529
+ mnt_point = "/mnt/redis/"
530
+ if b"mnt_point" in testDetails:
531
+ mnt_point = testDetails[b"mnt_point"].decode()
532
+ logging.info(
533
+ f"detected a mnt_point definition on the streamdata: {mnt_point}."
534
+ )
535
+
536
+ executable = f"{mnt_point}redis-server"
537
+ if b"executable" in testDetails:
538
+ executable = testDetails[b"executable"].decode()
539
+ logging.info(
540
+ f"detected a executable definition on the streamdata: {executable}."
541
+ )
542
+
543
+ server_name = "redis"
544
+ if b"server_name" in testDetails:
545
+ server_name = testDetails[b"server_name"].decode()
546
+ logging.info(
547
+ f"detected a server_name definition on the streamdata: {server_name}."
548
+ )
549
+
550
+ if b"restore_build_artifacts" in testDetails:
551
+ restore_build_artifacts = bool(
552
+ testDetails[b"restore_build_artifacts"].decode()
553
+ )
554
+ logging.info(
555
+ f"detected a restore_build_artifacts config {restore_build_artifacts} overriding the default just for this test"
556
+ )
557
+
558
+ test_docker_air_gap = default_docker_air_gap
559
+ # check if we override the docker air gap on this test details
560
+ if b"docker_air_gap" in testDetails:
561
+ test_docker_air_gap = bool(testDetails[b"docker_air_gap"].decode())
562
+ logging.info(
563
+ f"detected a docker air gap config {test_docker_air_gap} overriding the default of {default_docker_air_gap} just for this test"
564
+ )
496
565
 
497
566
  if b"priority_upper_limit" in testDetails:
498
567
  stream_priority_upper_limit = int(
@@ -566,7 +635,7 @@ def process_self_contained_coordinator_stream(
566
635
  if skip_test is False:
567
636
  overall_result = True
568
637
  profiler_dashboard_links = []
569
- if docker_air_gap:
638
+ if test_docker_air_gap:
570
639
  airgap_key = "docker:air-gap:{}".format(run_image)
571
640
  logging.info(
572
641
  "Restoring docker image: {} from {}".format(
@@ -584,7 +653,7 @@ def process_self_contained_coordinator_stream(
584
653
  {stream_id: stream_time_ms},
585
654
  )
586
655
  logging.info(
587
- f"Added stream with id {stream_id} to zset {zset_running_platform_benchmarks}"
656
+ f"Added stream with id {stream_id} to zset {zset_running_platform_benchmarks}. res={res}"
588
657
  )
589
658
 
590
659
  stream_test_list_pending = f"ci.benchmarks.redis/ci/redis/redis:benchmarks:{stream_id}:{running_platform}:tests_pending"
@@ -607,7 +676,7 @@ def process_self_contained_coordinator_stream(
607
676
  _,
608
677
  benchmark_config,
609
678
  test_name,
610
- ) = get_final_benchmark_config(None, stream, "")
679
+ ) = get_final_benchmark_config(None, None, stream, "")
611
680
  github_event_conn.lpush(stream_test_list_pending, test_name)
612
681
  github_event_conn.expire(
613
682
  stream_test_list_pending, REDIS_BINS_EXPIRE_SECS
@@ -650,7 +719,7 @@ def process_self_contained_coordinator_stream(
650
719
  _,
651
720
  benchmark_config,
652
721
  test_name,
653
- ) = get_final_benchmark_config(None, stream, "")
722
+ ) = get_final_benchmark_config(None, None, stream, "")
654
723
  github_event_conn.lrem(stream_test_list_pending, 1, test_name)
655
724
  github_event_conn.lpush(stream_test_list_running, test_name)
656
725
  github_event_conn.expire(
@@ -706,15 +775,14 @@ def process_self_contained_coordinator_stream(
706
775
  temporary_dir_client
707
776
  )
708
777
  )
709
- tf_github_org = "redis"
710
- tf_github_repo = "redis"
778
+
711
779
  setup_name = "oss-standalone"
712
780
  setup_type = "oss-standalone"
713
781
  tf_triggering_env = "ci"
714
782
  github_actor = "{}-{}".format(
715
783
  tf_triggering_env, running_platform
716
784
  )
717
- dso = "redis-server"
785
+ dso = server_name
718
786
  profilers_artifacts_matrix = []
719
787
 
720
788
  collection_summary_str = ""
@@ -733,16 +801,16 @@ def process_self_contained_coordinator_stream(
733
801
  collection_summary_str
734
802
  )
735
803
  )
804
+ if restore_build_artifacts:
805
+ restore_build_artifacts_from_test_details(
806
+ build_artifacts,
807
+ github_event_conn,
808
+ temporary_dir,
809
+ testDetails,
810
+ )
736
811
 
737
- restore_build_artifacts_from_test_details(
738
- build_artifacts,
739
- github_event_conn,
740
- temporary_dir,
741
- testDetails,
742
- )
743
- mnt_point = "/mnt/redis/"
744
812
  command = generate_standalone_redis_server_args(
745
- "{}redis-server".format(mnt_point),
813
+ executable,
746
814
  redis_proc_start_port,
747
815
  mnt_point,
748
816
  redis_configuration_parameters,
@@ -756,14 +824,19 @@ def process_self_contained_coordinator_stream(
756
824
  run_image, db_cpuset_cpus, command_str
757
825
  )
758
826
  )
759
- redis_container = docker_client.containers.run(
760
- image=run_image,
761
- volumes={
827
+ volumes = {}
828
+ working_dir = "/"
829
+ if mnt_point != "":
830
+ volumes = {
762
831
  temporary_dir: {
763
832
  "bind": mnt_point,
764
833
  "mode": "rw",
765
834
  },
766
- },
835
+ }
836
+ working_dir = mnt_point
837
+ redis_container = docker_client.containers.run(
838
+ image=run_image,
839
+ volumes=volumes,
767
840
  auto_remove=True,
768
841
  privileged=True,
769
842
  working_dir=mnt_point,
@@ -772,7 +845,11 @@ def process_self_contained_coordinator_stream(
772
845
  detach=True,
773
846
  cpuset_cpus=db_cpuset_cpus,
774
847
  pid_mode="host",
848
+ publish_all_ports=True,
775
849
  )
850
+
851
+ time.sleep(5)
852
+
776
853
  redis_containers.append(redis_container)
777
854
 
778
855
  r = redis.StrictRedis(port=redis_proc_start_port)
@@ -780,7 +857,27 @@ def process_self_contained_coordinator_stream(
780
857
  redis_conns = [r]
781
858
  reset_commandstats(redis_conns)
782
859
  redis_pids = []
783
- first_redis_pid = r.info()["process_id"]
860
+ redis_info = r.info()
861
+ first_redis_pid = redis_info["process_id"]
862
+ if git_hash is None and "redis_git_sha1" in redis_info:
863
+ git_hash = redis_info["redis_git_sha1"]
864
+ if (
865
+ git_hash == "" or git_hash == 0
866
+ ) and "redis_build_id" in redis_info:
867
+ git_hash = redis_info["redis_build_id"]
868
+ logging.info(
869
+ f"Given git_hash was None, we've collected that info from the server reply. git_hash={git_hash}"
870
+ )
871
+
872
+ server_version_keyname = f"{server_name}_version"
873
+ if (
874
+ git_version is None
875
+ and server_version_keyname in redis_info
876
+ ):
877
+ git_version = redis_info[server_version_keyname]
878
+ logging.info(
879
+ f"Given git_version was None, we've collected that info from the server reply key named {server_version_keyname}. git_version={git_version}"
880
+ )
784
881
  redis_pids.append(first_redis_pid)
785
882
  ceil_client_cpu_limit = extract_client_cpu_limit(
786
883
  benchmark_config
@@ -1099,6 +1196,7 @@ def process_self_contained_coordinator_stream(
1099
1196
  tf_triggering_env,
1100
1197
  topology_spec_name,
1101
1198
  default_metrics,
1199
+ git_hash,
1102
1200
  )
1103
1201
  r.shutdown(save=False)
1104
1202
 
@@ -1154,36 +1252,38 @@ def process_self_contained_coordinator_stream(
1154
1252
  test_result = False
1155
1253
  # tear-down
1156
1254
  logging.info("Tearing down setup")
1157
- for redis_container in redis_containers:
1158
- try:
1159
- redis_container.stop()
1160
- except docker.errors.NotFound:
1161
- logging.info(
1162
- "When trying to stop DB container with id {} and image {} it was already stopped".format(
1163
- redis_container.id, redis_container.image
1164
- )
1165
- )
1166
- pass
1167
-
1168
- for redis_container in client_containers:
1169
- if type(redis_container) == Container:
1255
+ if docker_keep_env is False:
1256
+ for redis_container in redis_containers:
1170
1257
  try:
1171
1258
  redis_container.stop()
1172
1259
  except docker.errors.NotFound:
1173
1260
  logging.info(
1174
- "When trying to stop Client container with id {} and image {} it was already stopped".format(
1261
+ "When trying to stop DB container with id {} and image {} it was already stopped".format(
1175
1262
  redis_container.id,
1176
1263
  redis_container.image,
1177
1264
  )
1178
1265
  )
1179
1266
  pass
1180
- logging.info(
1181
- "Removing temporary dirs {} and {}".format(
1182
- temporary_dir, temporary_dir_client
1267
+
1268
+ for redis_container in client_containers:
1269
+ if type(redis_container) == Container:
1270
+ try:
1271
+ redis_container.stop()
1272
+ except docker.errors.NotFound:
1273
+ logging.info(
1274
+ "When trying to stop Client container with id {} and image {} it was already stopped".format(
1275
+ redis_container.id,
1276
+ redis_container.image,
1277
+ )
1278
+ )
1279
+ pass
1280
+ logging.info(
1281
+ "Removing temporary dirs {} and {}".format(
1282
+ temporary_dir, temporary_dir_client
1283
+ )
1183
1284
  )
1184
- )
1185
- shutil.rmtree(temporary_dir, ignore_errors=True)
1186
- shutil.rmtree(temporary_dir_client, ignore_errors=True)
1285
+ shutil.rmtree(temporary_dir, ignore_errors=True)
1286
+ shutil.rmtree(temporary_dir_client, ignore_errors=True)
1187
1287
 
1188
1288
  overall_result &= test_result
1189
1289
 
@@ -1248,9 +1348,7 @@ def process_self_contained_coordinator_stream(
1248
1348
  tf_github_repo,
1249
1349
  verbose,
1250
1350
  )
1251
- logging.info(
1252
- f"Preparing regression info for the data available"
1253
- )
1351
+ logging.info("Preparing regression info for the data available")
1254
1352
  print_improvements_only = False
1255
1353
  print_regressions_only = False
1256
1354
  skip_unstable = False
@@ -1346,7 +1444,7 @@ def process_self_contained_coordinator_stream(
1346
1444
  f"Added test named {test_name} to the completed test list in key {stream_test_list_completed}"
1347
1445
  )
1348
1446
  else:
1349
- logging.error("Missing commit information within received message.")
1447
+ logging.error("Missing run image information within received message.")
1350
1448
 
1351
1449
  except Exception as e:
1352
1450
  logging.critical(
@@ -1397,7 +1495,7 @@ def filter_test_files(
1397
1495
  result,
1398
1496
  benchmark_config,
1399
1497
  test_name,
1400
- ) = get_final_benchmark_config(None, stream, "")
1498
+ ) = get_final_benchmark_config(None, None, stream, "")
1401
1499
  if result is False:
1402
1500
  logging.error(
1403
1501
  "Skipping {} given there were errors while calling get_final_benchmark_config()".format(
@@ -1495,7 +1593,10 @@ def data_prepopulation_step(
1495
1593
  full_benchmark_path = "/usr/local/bin/{}".format(preload_tool)
1496
1594
  client_mnt_point = "/mnt/client/"
1497
1595
  if "memtier_benchmark" in preload_tool:
1498
- (_, preload_command_str,) = prepare_memtier_benchmark_parameters(
1596
+ (
1597
+ _,
1598
+ preload_command_str,
1599
+ ) = prepare_memtier_benchmark_parameters(
1499
1600
  benchmark_config["dbconfig"]["preload_tool"],
1500
1601
  full_benchmark_path,
1501
1602
  port,
@@ -15,6 +15,7 @@ redis-topologies:
15
15
  - oss-standalone
16
16
  build-variants:
17
17
  - gcc:8.5.0-amd64-debian-buster-default
18
+ - dockerhub
18
19
  clientconfig:
19
20
  run_image: redislabs/memtier_benchmark:edge
20
21
  tool: memtier_benchmark
@@ -15,6 +15,7 @@ redis-topologies:
15
15
  - oss-standalone
16
16
  build-variants:
17
17
  - gcc:8.5.0-amd64-debian-buster-default
18
+ - dockerhub
18
19
  clientconfig:
19
20
  run_image: redislabs/memtier_benchmark:edge
20
21
  tool: memtier_benchmark
@@ -15,6 +15,7 @@ redis-topologies:
15
15
  - oss-standalone
16
16
  build-variants:
17
17
  - gcc:8.5.0-amd64-debian-buster-default
18
+ - dockerhub
18
19
  clientconfig:
19
20
  run_image: redislabs/memtier_benchmark:edge
20
21
  tool: memtier_benchmark
@@ -15,6 +15,7 @@ redis-topologies:
15
15
  - oss-standalone
16
16
  build-variants:
17
17
  - gcc:8.5.0-amd64-debian-buster-default
18
+ - dockerhub
18
19
  clientconfig:
19
20
  run_image: redislabs/memtier_benchmark:edge
20
21
  tool: memtier_benchmark