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

@@ -1067,6 +1067,9 @@ def add_standardized_metric_bybranch(
1067
1067
  labels["deployment_name+branch"] = "{} {}".format(
1068
1068
  deployment_name, tf_github_branch
1069
1069
  )
1070
+ labels["running_platform+branch"] = "{} {}".format(
1071
+ running_platform, tf_github_branch
1072
+ )
1070
1073
  labels["test_name"] = str(test_name)
1071
1074
  labels["metric"] = str(metric_name)
1072
1075
  logging.info(
@@ -1137,6 +1140,9 @@ def add_standardized_metric_byversion(
1137
1140
  labels["deployment_name+version"] = "{} {}".format(
1138
1141
  deployment_name, artifact_version
1139
1142
  )
1143
+ labels["running_platform+version"] = "{} {}".format(
1144
+ running_platform, artifact_version
1145
+ )
1140
1146
  labels["test_name"] = str(test_name)
1141
1147
  labels["metric"] = str(metric_name)
1142
1148
  logging.info(
@@ -1476,14 +1476,15 @@ def process_self_contained_coordinator_stream(
1476
1476
  dry_run_include_preload = args.dry_run_include_preload
1477
1477
  defaults_filename = args.defaults_filename
1478
1478
  override_test_runs = args.override_test_runs
1479
- (
1480
- _,
1481
- _,
1482
- default_metrics,
1483
- _,
1484
- _,
1485
- _,
1486
- ) = get_defaults(defaults_filename)
1479
+ get_defaults_result = get_defaults(defaults_filename)
1480
+ # Handle variable number of return values from get_defaults
1481
+ if len(get_defaults_result) >= 3:
1482
+ default_metrics = get_defaults_result[2]
1483
+ else:
1484
+ default_metrics = []
1485
+ logging.warning(
1486
+ "get_defaults returned fewer values than expected, using empty default_metrics"
1487
+ )
1487
1488
 
1488
1489
  # For memory comparison mode, analyze datasets before starting
1489
1490
  if memory_comparison_only:
@@ -201,4 +201,10 @@ def create_self_contained_coordinator_args(project_name):
201
201
  default=None,
202
202
  help="Password for HTTP endpoint authentication. HTTP server is disabled if not provided.",
203
203
  )
204
+ parser.add_argument(
205
+ "--skip-clear-pending-on-startup",
206
+ default=False,
207
+ action="store_true",
208
+ help="Skip automatically clearing pending messages for this consumer on startup. By default, pending messages are cleared to recover from crashes.",
209
+ )
204
210
  return parser
@@ -99,6 +99,50 @@ def get_runners_consumer_group_name(running_platform):
99
99
  return consumer_group_name
100
100
 
101
101
 
102
+ def clear_pending_messages_for_consumer(conn, running_platform, consumer_pos):
103
+ """Clear all pending messages for a specific consumer on startup"""
104
+ consumer_group_name = get_runners_consumer_group_name(running_platform)
105
+ consumer_name = "{}-self-contained-proc#{}".format(
106
+ consumer_group_name, consumer_pos
107
+ )
108
+
109
+ try:
110
+ # Get pending messages for this specific consumer
111
+ pending_info = conn.xpending_range(
112
+ STREAM_KEYNAME_NEW_BUILD_EVENTS,
113
+ consumer_group_name,
114
+ min="-",
115
+ max="+",
116
+ count=1000, # Get up to 1000 pending messages
117
+ consumername=consumer_name,
118
+ )
119
+
120
+ if pending_info:
121
+ message_ids = [msg["message_id"] for msg in pending_info]
122
+ logging.info(
123
+ f"Found {len(message_ids)} pending messages for consumer {consumer_name}. Clearing them..."
124
+ )
125
+
126
+ # Acknowledge all pending messages to clear them
127
+ ack_count = conn.xack(
128
+ STREAM_KEYNAME_NEW_BUILD_EVENTS, consumer_group_name, *message_ids
129
+ )
130
+
131
+ logging.info(
132
+ f"Successfully cleared {ack_count} pending messages for consumer {consumer_name}"
133
+ )
134
+ else:
135
+ logging.info(f"No pending messages found for consumer {consumer_name}")
136
+
137
+ except redis.exceptions.ResponseError as e:
138
+ if "NOGROUP" in str(e):
139
+ logging.info(f"Consumer group {consumer_group_name} does not exist yet")
140
+ else:
141
+ logging.warning(f"Error clearing pending messages: {e}")
142
+ except Exception as e:
143
+ logging.error(f"Unexpected error clearing pending messages: {e}")
144
+
145
+
102
146
  def process_self_contained_coordinator_stream(
103
147
  conn,
104
148
  datasink_push_results_redistimeseries,
@@ -75,6 +75,7 @@ from redis_benchmarks_specification.__self_contained_coordinator__.args import (
75
75
  from redis_benchmarks_specification.__self_contained_coordinator__.runners import (
76
76
  build_runners_consumer_group_create,
77
77
  get_runners_consumer_group_name,
78
+ clear_pending_messages_for_consumer,
78
79
  )
79
80
  from redis_benchmarks_specification.__setups__.topologies import get_topologies
80
81
 
@@ -649,6 +650,17 @@ def main():
649
650
  logging.info("checking build spec requirements")
650
651
  running_platform = args.platform_name
651
652
  build_runners_consumer_group_create(gh_event_conn, running_platform)
653
+
654
+ # Clear pending messages by default (unless explicitly skipped)
655
+ if not args.skip_clear_pending_on_startup:
656
+ consumer_pos = args.consumer_pos
657
+ logging.info("Clearing pending messages on startup (default behavior)")
658
+ clear_pending_messages_for_consumer(
659
+ gh_event_conn, running_platform, consumer_pos
660
+ )
661
+ else:
662
+ logging.info("Skipping pending message cleanup as requested")
663
+
652
664
  stream_id = None
653
665
  docker_client = docker.from_env()
654
666
  home = str(Path.home())
@@ -674,14 +686,15 @@ def main():
674
686
  grafana_profile_dashboard = args.grafana_profile_dashboard
675
687
 
676
688
  defaults_filename = args.defaults_filename
677
- (
678
- _,
679
- _,
680
- default_metrics,
681
- _,
682
- _,
683
- _,
684
- ) = get_defaults(defaults_filename)
689
+ get_defaults_result = get_defaults(defaults_filename)
690
+ # Handle variable number of return values from get_defaults
691
+ if len(get_defaults_result) >= 3:
692
+ default_metrics = get_defaults_result[2]
693
+ else:
694
+ default_metrics = []
695
+ logging.warning(
696
+ "get_defaults returned fewer values than expected, using empty default_metrics"
697
+ )
685
698
 
686
699
  # Consumer id
687
700
  consumer_pos = args.consumer_pos
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: redis-benchmarks-specification
3
- Version: 0.1.334
3
+ Version: 0.1.336
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
@@ -18,7 +18,7 @@ redis_benchmarks_specification/__common__/package.py,sha256=4uVt1BAZ999LV2rZkq--
18
18
  redis_benchmarks_specification/__common__/runner.py,sha256=TKMUFJ3nLSfmSU7P_ok9oM5-pI4L4tFxsWLUWaUHhbI,16733
19
19
  redis_benchmarks_specification/__common__/spec.py,sha256=D_SN48wg6NMthW_-OS1H5bydSDiuZpfd4WPPj7Vfwmc,5760
20
20
  redis_benchmarks_specification/__common__/suppress_warnings.py,sha256=xpOjJ_piGYWlGq9ITr-ZwSCl2GpreA9juZIBao4fDRs,691
21
- redis_benchmarks_specification/__common__/timeseries.py,sha256=P0tbmH7leEMQwvqlr4lYZgr_I6EY3chh1Kf7XWe5fDQ,54048
21
+ redis_benchmarks_specification/__common__/timeseries.py,sha256=kHpkpNwZgWpjCh_Fg0wFcxNRMTb5SoSNwd_UHUCNVhc,54283
22
22
  redis_benchmarks_specification/__compare__/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
23
23
  redis_benchmarks_specification/__compare__/args.py,sha256=CNtA7pI9CJDTBJPGL2pNVfis7VDdxLautwRyka7oUCI,8911
24
24
  redis_benchmarks_specification/__compare__/compare.py,sha256=_AbuV3FZxtUZIdq4qq24LNzPNIdtQQaqrk8bUjn9blk,84327
@@ -26,9 +26,9 @@ redis_benchmarks_specification/__init__.py,sha256=YQIEx2sLPPA0JR9OuCuMNMNtm-f_gq
26
26
  redis_benchmarks_specification/__runner__/__init__.py,sha256=l-G1z-t6twUgi8QLueqoTQLvJmv3hJoEYskGm6H7L6M,83
27
27
  redis_benchmarks_specification/__runner__/args.py,sha256=K3VGmBC0-9lSv9H6VDp0N-6FGMWvc_4H0pG_TOXN5u8,11312
28
28
  redis_benchmarks_specification/__runner__/remote_profiling.py,sha256=R7obNQju8mmY9oKkcndjI4aAuxi84OCLhDSqqaYu1SU,18610
29
- redis_benchmarks_specification/__runner__/runner.py,sha256=V6PnV5Tt2qupLcfJg0yhj_AqI5pIzFj-0EXc_JtYo84,156096
29
+ redis_benchmarks_specification/__runner__/runner.py,sha256=JW2fB0C6Ce4d6VVQK50qNqpSNGEjq6QVjowUMUA0gzs,156345
30
30
  redis_benchmarks_specification/__self_contained_coordinator__/__init__.py,sha256=l-G1z-t6twUgi8QLueqoTQLvJmv3hJoEYskGm6H7L6M,83
31
- redis_benchmarks_specification/__self_contained_coordinator__/args.py,sha256=1LePhRkDsoMPFclM_DoXBIoMBN8zcVoQMnm9wTK5Uqw,6961
31
+ redis_benchmarks_specification/__self_contained_coordinator__/args.py,sha256=Rkajbvb-R4aEJd01gHNbAWrKuiqycHNfKVdO28nDEjI,7244
32
32
  redis_benchmarks_specification/__self_contained_coordinator__/artifacts.py,sha256=OVHqJzDgeSSRfUSiKp1ZTAVv14PvSbk-5yJsAAoUfpw,936
33
33
  redis_benchmarks_specification/__self_contained_coordinator__/build_info.py,sha256=vlg8H8Rxu2falW8xp1GvL1SV1fyBguSbz6Apxc7A2yM,2282
34
34
  redis_benchmarks_specification/__self_contained_coordinator__/clients.py,sha256=EL1V4-i-tTav1mcF_CUosqPF3Q1qi9BZL0zFajEk70c,1878
@@ -36,8 +36,8 @@ redis_benchmarks_specification/__self_contained_coordinator__/cpuset.py,sha256=s
36
36
  redis_benchmarks_specification/__self_contained_coordinator__/docker.py,sha256=09SyAfqlzs1KG9ZAajClNWtiNk4Jqzd--4-m3n1rLjU,3156
37
37
  redis_benchmarks_specification/__self_contained_coordinator__/post_processing.py,sha256=sVLKNnWdAqYY9DjVdqRC5tDaIrVSaI3Ca7w8-DQ-LRM,776
38
38
  redis_benchmarks_specification/__self_contained_coordinator__/prepopulation.py,sha256=1UeFr2T1ZQBcHCSd4W1ZtaWgXyFPfjLyDi_DgDc1eTA,2957
39
- redis_benchmarks_specification/__self_contained_coordinator__/runners.py,sha256=F11zO_ILnpmiVwTeCQnP5nDHQk3kNnajPftwKsbhlXE,30209
40
- redis_benchmarks_specification/__self_contained_coordinator__/self_contained_coordinator.py,sha256=2QdjjUyGB-GCyyJtSe984GY634i3qE019qWCnDBuI0U,111825
39
+ redis_benchmarks_specification/__self_contained_coordinator__/runners.py,sha256=agom6H0iDUH_oQkObS8EtoAm0JUpTVeiBv-EMEnEMtY,31908
40
+ redis_benchmarks_specification/__self_contained_coordinator__/self_contained_coordinator.py,sha256=e60Juo_zq-gSD4SPGwprFGamwYt5zLet47SkLl2TcWQ,112546
41
41
  redis_benchmarks_specification/__setups__/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
42
42
  redis_benchmarks_specification/__setups__/topologies.py,sha256=xQ1IJkcTji_ZjLiJd3vOxZpvbNtBLZw9cPkw5hGJKHU,481
43
43
  redis_benchmarks_specification/__spec__/__init__.py,sha256=l-G1z-t6twUgi8QLueqoTQLvJmv3hJoEYskGm6H7L6M,83
@@ -282,8 +282,8 @@ redis_benchmarks_specification/test-suites/memtier_benchmark-playbook-session-st
282
282
  redis_benchmarks_specification/test-suites/memtier_benchmark-playbook-session-storage-1k-sessions.yml,sha256=2egtIxPxCze2jlbAfgsk4v9JSQHNMoPLbDWFEW8olDg,7006
283
283
  redis_benchmarks_specification/test-suites/template.txt,sha256=ezqGiRPOvuSDO0iG7GEf-AGXNfHbgXI89_G0RUEzL88,481
284
284
  redis_benchmarks_specification/vector-search-test-suites/vector_db_benchmark_test.yml,sha256=PD7ow-k4Ll2BkhEC3aIqiaCZt8Hc4aJIp96Lw3J3mcI,791
285
- redis_benchmarks_specification-0.1.334.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
286
- redis_benchmarks_specification-0.1.334.dist-info/METADATA,sha256=dE2ReU_PQYen1kcQ2YRh5AfPmkb1Hrx-j15Qj2vt508,22768
287
- redis_benchmarks_specification-0.1.334.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
288
- redis_benchmarks_specification-0.1.334.dist-info/entry_points.txt,sha256=x5WBXCZsnDRTZxV7SBGmC65L2k-ygdDOxV8vuKN00Nk,715
289
- redis_benchmarks_specification-0.1.334.dist-info/RECORD,,
285
+ redis_benchmarks_specification-0.1.336.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
286
+ redis_benchmarks_specification-0.1.336.dist-info/METADATA,sha256=hM1VX_8NMVcnRebZ26eX7WOZ2Zga0G06PYsV5FFJ114,22768
287
+ redis_benchmarks_specification-0.1.336.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
288
+ redis_benchmarks_specification-0.1.336.dist-info/entry_points.txt,sha256=x5WBXCZsnDRTZxV7SBGmC65L2k-ygdDOxV8vuKN00Nk,715
289
+ redis_benchmarks_specification-0.1.336.dist-info/RECORD,,