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

@@ -202,6 +202,12 @@ def create_client_runner_args(project_name):
202
202
  action="store_true",
203
203
  help="Assume benchmarking tool (e.g. memtier benchmark) is installed locally and execute it without using a docker container.",
204
204
  )
205
+ parser.add_argument(
206
+ "--memtier-bin-path",
207
+ type=str,
208
+ default="memtier_benchmark",
209
+ help="Path to memtier_benchmark binary when using --benchmark_local_install. Default is 'memtier_benchmark' (assumes it's in PATH).",
210
+ )
205
211
  parser.add_argument(
206
212
  "--override-test-runs",
207
213
  default=1,
@@ -235,7 +241,7 @@ def create_client_runner_args(project_name):
235
241
  "--enable-remote-profiling",
236
242
  default=False,
237
243
  action="store_true",
238
- help="Enable remote profiling of Redis processes via HTTP GET endpoint. Profiles are collected in folded format during benchmark execution.",
244
+ help="Enable remote profiling of Redis processes via HTTP GET endpoint. Profiles are collected in pprof binary format during benchmark execution.",
239
245
  )
240
246
  parser.add_argument(
241
247
  "--remote-profile-host",
@@ -246,8 +252,8 @@ def create_client_runner_args(project_name):
246
252
  parser.add_argument(
247
253
  "--remote-profile-port",
248
254
  type=int,
249
- default=8080,
250
- help="Port for remote profiling HTTP endpoint. Default is 8080.",
255
+ default=10000,
256
+ help="Port for remote profiling HTTP endpoint. Default is 10000.",
251
257
  )
252
258
  parser.add_argument(
253
259
  "--remote-profile-output-dir",
@@ -3,7 +3,7 @@ Remote profiling utilities for Redis benchmark runner.
3
3
 
4
4
  This module provides functionality to trigger remote profiling of Redis processes
5
5
  via HTTP GET endpoints during benchmark execution. Profiles are collected in
6
- folded format for performance analysis.
6
+ pprof binary format for performance analysis.
7
7
  """
8
8
 
9
9
  import datetime
@@ -103,9 +103,9 @@ def trigger_remote_profile(
103
103
  timeout: int = 60,
104
104
  username: Optional[str] = None,
105
105
  password: Optional[str] = None
106
- ) -> Optional[str]:
106
+ ) -> Optional[bytes]:
107
107
  """
108
- Trigger remote profiling via HTTP GET request.
108
+ Trigger remote profiling via HTTP GET request using pprof endpoint.
109
109
 
110
110
  Args:
111
111
  host: Remote host address
@@ -117,9 +117,9 @@ def trigger_remote_profile(
117
117
  password: Optional password for HTTP basic authentication
118
118
 
119
119
  Returns:
120
- Profile content in folded format, or None if failed
120
+ Profile content in pprof binary format, or None if failed
121
121
  """
122
- url = f"http://{host}:{port}/debug/folded/profile"
122
+ url = f"http://{host}:{port}/debug/pprof/profile"
123
123
  params = {
124
124
  "pid": pid,
125
125
  "seconds": duration
@@ -136,8 +136,8 @@ def trigger_remote_profile(
136
136
  response = requests.get(url, params=params, timeout=timeout, auth=auth)
137
137
  response.raise_for_status()
138
138
 
139
- profile_content = response.text
140
- logging.info(f"Successfully collected profile: {len(profile_content)} characters")
139
+ profile_content = response.content
140
+ logging.info(f"Successfully collected profile: {len(profile_content)} bytes")
141
141
  return profile_content
142
142
 
143
143
  except requests.exceptions.Timeout:
@@ -157,55 +157,65 @@ def trigger_remote_profile(
157
157
 
158
158
 
159
159
  def save_profile_with_metadata(
160
- profile_content: str,
160
+ profile_content: bytes,
161
161
  benchmark_name: str,
162
162
  output_dir: str,
163
163
  redis_metadata: Dict[str, Any],
164
164
  duration: int
165
165
  ) -> Optional[str]:
166
166
  """
167
- Save profile content to file with metadata comments.
168
-
167
+ Save profile content to file in pprof binary format.
168
+
169
169
  Args:
170
- profile_content: Profile data in folded format
170
+ profile_content: Profile data in pprof binary format
171
171
  benchmark_name: Name of the benchmark
172
172
  output_dir: Output directory path
173
173
  redis_metadata: Redis metadata dictionary
174
174
  duration: Profiling duration in seconds
175
-
175
+
176
176
  Returns:
177
177
  Path to saved file, or None if failed
178
178
  """
179
179
  try:
180
180
  # Create output directory if it doesn't exist
181
181
  Path(output_dir).mkdir(parents=True, exist_ok=True)
182
-
183
- # Generate filename
184
- filename = f"{benchmark_name}.folded"
182
+
183
+ # Generate filename with .pb.gz extension
184
+ filename = f"{benchmark_name}.pb.gz"
185
185
  filepath = os.path.join(output_dir, filename)
186
-
186
+
187
187
  # Generate timestamp
188
188
  timestamp = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
189
-
190
- # Create metadata comment
191
- metadata_comment = (
192
- f"# profile from redis sha = {redis_metadata['redis_git_sha1']} "
189
+
190
+ # Write binary profile content directly
191
+ with open(filepath, 'wb') as f:
192
+ f.write(profile_content)
193
+
194
+ # Create a separate metadata file
195
+ metadata_filename = f"{benchmark_name}.metadata.txt"
196
+ metadata_filepath = os.path.join(output_dir, metadata_filename)
197
+
198
+ metadata_content = (
199
+ f"Profile from redis sha = {redis_metadata['redis_git_sha1']} "
193
200
  f"and pid {redis_metadata['process_id']} for duration of {duration}s. "
194
- f"collection in date {timestamp}\n"
195
- f"# benchmark_name={benchmark_name}\n"
196
- f"# redis_git_sha1={redis_metadata['redis_git_sha1']}\n"
197
- f"# redis_version={redis_metadata['redis_version']}\n"
198
- f"# redis_git_dirty={redis_metadata['redis_git_dirty']}\n"
201
+ f"Collection date: {timestamp}\n"
202
+ f"benchmark_name={benchmark_name}\n"
203
+ f"redis_git_sha1={redis_metadata['redis_git_sha1']}\n"
204
+ f"redis_version={redis_metadata['redis_version']}\n"
205
+ f"redis_git_dirty={redis_metadata['redis_git_dirty']}\n"
206
+ f"redis_build_id={redis_metadata['redis_build_id']}\n"
207
+ f"process_id={redis_metadata['process_id']}\n"
208
+ f"tcp_port={redis_metadata['tcp_port']}\n"
209
+ f"duration_seconds={duration}\n"
199
210
  )
200
-
201
- # Write file with metadata and profile content
202
- with open(filepath, 'w') as f:
203
- f.write(metadata_comment)
204
- f.write(profile_content)
205
-
211
+
212
+ with open(metadata_filepath, 'w') as f:
213
+ f.write(metadata_content)
214
+
206
215
  logging.info(f"Saved profile to: {filepath}")
216
+ logging.info(f"Saved metadata to: {metadata_filepath}")
207
217
  return filepath
208
-
218
+
209
219
  except Exception as e:
210
220
  logging.error(f"Failed to save profile file: {e}")
211
221
  return None
@@ -281,7 +291,7 @@ class RemoteProfiler:
281
291
  username=self.username, password=self.password
282
292
  )
283
293
 
284
- if profile_content:
294
+ if profile_content is not None:
285
295
  # Save profile with metadata
286
296
  filepath = save_profile_with_metadata(
287
297
  profile_content, benchmark_name, self.output_dir, redis_metadata, duration
@@ -240,13 +240,19 @@ def run_multiple_clients(
240
240
 
241
241
  # Prepare benchmark command for this client
242
242
  if "memtier_benchmark" in client_tool:
243
+ # Set benchmark path based on local install option
244
+ if args.benchmark_local_install:
245
+ full_benchmark_path = getattr(args, 'memtier_bin_path', 'memtier_benchmark')
246
+ else:
247
+ full_benchmark_path = f"/usr/local/bin/{client_tool}"
248
+
243
249
  (
244
250
  _,
245
251
  benchmark_command_str,
246
252
  arbitrary_command,
247
253
  ) = prepare_memtier_benchmark_parameters(
248
254
  client_config,
249
- client_tool,
255
+ full_benchmark_path,
250
256
  port,
251
257
  host,
252
258
  password,
@@ -1345,6 +1351,7 @@ def process_self_contained_coordinator_stream(
1345
1351
  oss_cluster_api_enabled,
1346
1352
  unix_socket,
1347
1353
  buffer_timeout,
1354
+ args,
1348
1355
  )
1349
1356
  if res is False:
1350
1357
  logging.warning(
@@ -1388,7 +1395,12 @@ def process_self_contained_coordinator_stream(
1388
1395
  # backwards compatible
1389
1396
  if benchmark_tool is None:
1390
1397
  benchmark_tool = "redis-benchmark"
1391
- full_benchmark_path = f"/usr/local/bin/{benchmark_tool}"
1398
+
1399
+ # Set benchmark path based on local install option
1400
+ if args.benchmark_local_install and "memtier_benchmark" in benchmark_tool:
1401
+ full_benchmark_path = getattr(args, 'memtier_bin_path', 'memtier_benchmark')
1402
+ else:
1403
+ full_benchmark_path = f"/usr/local/bin/{benchmark_tool}"
1392
1404
 
1393
1405
  # setup the benchmark
1394
1406
  (
@@ -2283,6 +2295,7 @@ def data_prepopulation_step(
2283
2295
  oss_cluster_api_enabled=False,
2284
2296
  unix_socket="",
2285
2297
  timeout_buffer=60,
2298
+ args=None,
2286
2299
  ):
2287
2300
  result = True
2288
2301
  # setup the benchmark
@@ -2301,7 +2314,12 @@ def data_prepopulation_step(
2301
2314
  benchmark_config["dbconfig"], "preload_tool"
2302
2315
  )
2303
2316
  preload_tool = extract_client_tool(benchmark_config["dbconfig"], "preload_tool")
2304
- full_benchmark_path = f"/usr/local/bin/{preload_tool}"
2317
+
2318
+ # Set preload tool path based on local install option
2319
+ if benchmark_local_install and "memtier_benchmark" in preload_tool and args:
2320
+ full_benchmark_path = getattr(args, 'memtier_bin_path', 'memtier_benchmark')
2321
+ else:
2322
+ full_benchmark_path = f"/usr/local/bin/{preload_tool}"
2305
2323
  client_mnt_point = "/mnt/client/"
2306
2324
 
2307
2325
  if "memtier_benchmark" in preload_tool:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: redis-benchmarks-specification
3
- Version: 0.1.279
3
+ Version: 0.1.281
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
@@ -23,9 +23,9 @@ redis_benchmarks_specification/__compare__/args.py,sha256=FlKD1wutBoKxeahpXw1gY2
23
23
  redis_benchmarks_specification/__compare__/compare.py,sha256=O6ZuB6Ln5xkTX5jRaizpj1PTPhmoETcf-_PY-A_CGr8,57179
24
24
  redis_benchmarks_specification/__init__.py,sha256=YQIEx2sLPPA0JR9OuCuMNMNtm-f_gqDKgzvNJnkGNKY,491
25
25
  redis_benchmarks_specification/__runner__/__init__.py,sha256=l-G1z-t6twUgi8QLueqoTQLvJmv3hJoEYskGm6H7L6M,83
26
- redis_benchmarks_specification/__runner__/args.py,sha256=7XNxIsVfn7woNwRkYJhrENj-n9lvks3BJ56BOj-hJeU,9255
27
- redis_benchmarks_specification/__runner__/remote_profiling.py,sha256=R4KNm44EGeqdqEkZmxjeKg5qpYVeOC54RyyVDeZijQE,11438
28
- redis_benchmarks_specification/__runner__/runner.py,sha256=nn-F6dvKnBEOUkQoBCDHnABwAw-s4uGi32g7TujEwoI,98581
26
+ redis_benchmarks_specification/__runner__/args.py,sha256=PooAscPy7owoZvhrbZDGlJjGH-6s6xgdcVPvb73VnhI,9521
27
+ redis_benchmarks_specification/__runner__/remote_profiling.py,sha256=4D5FKfqpkS50RE46iQGCKE-cB9BUho9OO9zqioF89Ns,11910
28
+ redis_benchmarks_specification/__runner__/runner.py,sha256=K_YthEGoEX66b0kEAKvWLfjSXq86SJUGyOof33qqo64,99489
29
29
  redis_benchmarks_specification/__self_contained_coordinator__/__init__.py,sha256=l-G1z-t6twUgi8QLueqoTQLvJmv3hJoEYskGm6H7L6M,83
30
30
  redis_benchmarks_specification/__self_contained_coordinator__/args.py,sha256=uxBjdQ78klvsVi6lOfGYQVaWIxc8OI-DwYKY16SgvCY,5952
31
31
  redis_benchmarks_specification/__self_contained_coordinator__/artifacts.py,sha256=OVHqJzDgeSSRfUSiKp1ZTAVv14PvSbk-5yJsAAoUfpw,936
@@ -273,8 +273,8 @@ redis_benchmarks_specification/test-suites/memtier_benchmark-nokeys-pubsub-publi
273
273
  redis_benchmarks_specification/test-suites/memtier_benchmark-nokeys-server-time-pipeline-10.yml,sha256=rJuWWXubUeRKQ2GSfHlbPMLeOyM9Eu_MzvN2vgKcAhA,672
274
274
  redis_benchmarks_specification/test-suites/template.txt,sha256=d_edIE7Sxa5X7I2yG-Io0bPdbDIHR0oWFoCA3XUt_EU,435
275
275
  redis_benchmarks_specification/vector-search-test-suites/vector_db_benchmark_test.yml,sha256=uhaSP6YUVmPvZU-qMtPPGdvNEUgUBqOfveUbeJ9WsbI,972
276
- redis_benchmarks_specification-0.1.279.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
277
- redis_benchmarks_specification-0.1.279.dist-info/METADATA,sha256=L4-eWOkA3EDpxwXdqLiuahxFbe2sqi-oo7GoSmPdhq4,22726
278
- redis_benchmarks_specification-0.1.279.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
279
- redis_benchmarks_specification-0.1.279.dist-info/entry_points.txt,sha256=x5WBXCZsnDRTZxV7SBGmC65L2k-ygdDOxV8vuKN00Nk,715
280
- redis_benchmarks_specification-0.1.279.dist-info/RECORD,,
276
+ redis_benchmarks_specification-0.1.281.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
277
+ redis_benchmarks_specification-0.1.281.dist-info/METADATA,sha256=KON1FQ236D-9xT5JvEFaCo6o51ZHOQd63FV45BBTYHE,22726
278
+ redis_benchmarks_specification-0.1.281.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
279
+ redis_benchmarks_specification-0.1.281.dist-info/entry_points.txt,sha256=x5WBXCZsnDRTZxV7SBGmC65L2k-ygdDOxV8vuKN00Nk,715
280
+ redis_benchmarks_specification-0.1.281.dist-info/RECORD,,