redis-benchmarks-specification 0.1.280__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.
- redis_benchmarks_specification/__runner__/args.py +3 -3
- redis_benchmarks_specification/__runner__/remote_profiling.py +43 -33
- {redis_benchmarks_specification-0.1.280.dist-info → redis_benchmarks_specification-0.1.281.dist-info}/METADATA +1 -1
- {redis_benchmarks_specification-0.1.280.dist-info → redis_benchmarks_specification-0.1.281.dist-info}/RECORD +7 -7
- {redis_benchmarks_specification-0.1.280.dist-info → redis_benchmarks_specification-0.1.281.dist-info}/LICENSE +0 -0
- {redis_benchmarks_specification-0.1.280.dist-info → redis_benchmarks_specification-0.1.281.dist-info}/WHEEL +0 -0
- {redis_benchmarks_specification-0.1.280.dist-info → redis_benchmarks_specification-0.1.281.dist-info}/entry_points.txt +0 -0
|
@@ -241,7 +241,7 @@ def create_client_runner_args(project_name):
|
|
|
241
241
|
"--enable-remote-profiling",
|
|
242
242
|
default=False,
|
|
243
243
|
action="store_true",
|
|
244
|
-
help="Enable remote profiling of Redis processes via HTTP GET endpoint. Profiles are collected in
|
|
244
|
+
help="Enable remote profiling of Redis processes via HTTP GET endpoint. Profiles are collected in pprof binary format during benchmark execution.",
|
|
245
245
|
)
|
|
246
246
|
parser.add_argument(
|
|
247
247
|
"--remote-profile-host",
|
|
@@ -252,8 +252,8 @@ def create_client_runner_args(project_name):
|
|
|
252
252
|
parser.add_argument(
|
|
253
253
|
"--remote-profile-port",
|
|
254
254
|
type=int,
|
|
255
|
-
default=
|
|
256
|
-
help="Port for remote profiling HTTP endpoint. Default is
|
|
255
|
+
default=10000,
|
|
256
|
+
help="Port for remote profiling HTTP endpoint. Default is 10000.",
|
|
257
257
|
)
|
|
258
258
|
parser.add_argument(
|
|
259
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
|
-
|
|
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[
|
|
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
|
|
120
|
+
Profile content in pprof binary format, or None if failed
|
|
121
121
|
"""
|
|
122
|
-
url = f"http://{host}:{port}/debug/
|
|
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.
|
|
140
|
-
logging.info(f"Successfully collected profile: {len(profile_content)}
|
|
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:
|
|
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
|
|
168
|
-
|
|
167
|
+
Save profile content to file in pprof binary format.
|
|
168
|
+
|
|
169
169
|
Args:
|
|
170
|
-
profile_content: Profile data in
|
|
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}.
|
|
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
|
-
#
|
|
191
|
-
|
|
192
|
-
f
|
|
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"
|
|
195
|
-
f"
|
|
196
|
-
f"
|
|
197
|
-
f"
|
|
198
|
-
f"
|
|
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
|
-
|
|
202
|
-
|
|
203
|
-
|
|
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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: redis-benchmarks-specification
|
|
3
|
-
Version: 0.1.
|
|
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,8 +23,8 @@ 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=
|
|
27
|
-
redis_benchmarks_specification/__runner__/remote_profiling.py,sha256=
|
|
26
|
+
redis_benchmarks_specification/__runner__/args.py,sha256=PooAscPy7owoZvhrbZDGlJjGH-6s6xgdcVPvb73VnhI,9521
|
|
27
|
+
redis_benchmarks_specification/__runner__/remote_profiling.py,sha256=4D5FKfqpkS50RE46iQGCKE-cB9BUho9OO9zqioF89Ns,11910
|
|
28
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
|
|
@@ -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.
|
|
277
|
-
redis_benchmarks_specification-0.1.
|
|
278
|
-
redis_benchmarks_specification-0.1.
|
|
279
|
-
redis_benchmarks_specification-0.1.
|
|
280
|
-
redis_benchmarks_specification-0.1.
|
|
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,,
|
|
File without changes
|
|
File without changes
|