redisbench-admin 0.11.72__py3-none-any.whl → 0.11.73__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.
- redisbench_admin/run/common.py +45 -3
- redisbench_admin/run_remote/remote_helpers.py +5 -4
- redisbench_admin/utils/utils.py +57 -1
- {redisbench_admin-0.11.72.dist-info → redisbench_admin-0.11.73.dist-info}/METADATA +1 -1
- {redisbench_admin-0.11.72.dist-info → redisbench_admin-0.11.73.dist-info}/RECORD +8 -8
- {redisbench_admin-0.11.72.dist-info → redisbench_admin-0.11.73.dist-info}/WHEEL +0 -0
- {redisbench_admin-0.11.72.dist-info → redisbench_admin-0.11.73.dist-info}/entry_points.txt +0 -0
- {redisbench_admin-0.11.72.dist-info → redisbench_admin-0.11.73.dist-info}/licenses/LICENSE +0 -0
redisbench_admin/run/common.py
CHANGED
|
@@ -38,6 +38,7 @@ from redisbench_admin.run.ycsb.ycsb import (
|
|
|
38
38
|
prepare_ycsb_benchmark_command,
|
|
39
39
|
prepare_go_ycsb_benchmark_command,
|
|
40
40
|
)
|
|
41
|
+
from redisbench_admin.utils.utils import get_remote_input_file_from_url
|
|
41
42
|
from redisbench_admin.run_remote.args import OVERRIDE_MODULES
|
|
42
43
|
from redisbench_admin.run_remote.remote_helpers import (
|
|
43
44
|
extract_module_semver_from_info_modules_cmd,
|
|
@@ -66,6 +67,38 @@ PERFORMANCE_GH_TOKEN = os.getenv("PERFORMANCE_GH_TOKEN", None)
|
|
|
66
67
|
REDIS_BINARY = os.getenv("REDIS_BINARY", "redis-server")
|
|
67
68
|
|
|
68
69
|
|
|
70
|
+
def extract_input_file_url_from_parameters(entry, benchmark_tool):
|
|
71
|
+
"""
|
|
72
|
+
Extract the input file URL from the parameters entry.
|
|
73
|
+
Different tools use different parameter names:
|
|
74
|
+
- ftsb_*: uses "input" parameter
|
|
75
|
+
- tsbs_*, aibench_*: uses "file" parameter
|
|
76
|
+
|
|
77
|
+
Args:
|
|
78
|
+
entry: The benchmark config entry containing "parameters"
|
|
79
|
+
benchmark_tool: The benchmark tool name
|
|
80
|
+
|
|
81
|
+
Returns:
|
|
82
|
+
The file URL if found, None otherwise
|
|
83
|
+
"""
|
|
84
|
+
if "parameters" not in entry:
|
|
85
|
+
return None
|
|
86
|
+
|
|
87
|
+
# Determine which parameter name to look for based on the tool
|
|
88
|
+
if "ftsb_" in benchmark_tool:
|
|
89
|
+
param_name = "input"
|
|
90
|
+
elif "tsbs_" in benchmark_tool or "aibench_" in benchmark_tool:
|
|
91
|
+
param_name = "file"
|
|
92
|
+
else:
|
|
93
|
+
return None
|
|
94
|
+
|
|
95
|
+
for param in entry["parameters"]:
|
|
96
|
+
if param_name in param:
|
|
97
|
+
return param[param_name]
|
|
98
|
+
|
|
99
|
+
return None
|
|
100
|
+
|
|
101
|
+
|
|
69
102
|
def prepare_benchmark_parameters(
|
|
70
103
|
benchmark_config,
|
|
71
104
|
benchmark_tool,
|
|
@@ -88,6 +121,10 @@ def prepare_benchmark_parameters(
|
|
|
88
121
|
if type(benchmark_config[config_key]) == list:
|
|
89
122
|
for entry in benchmark_config[config_key]:
|
|
90
123
|
if "parameters" in entry:
|
|
124
|
+
# Extract input file URL from parameters
|
|
125
|
+
input_file_url = extract_input_file_url_from_parameters(
|
|
126
|
+
entry, benchmark_tool
|
|
127
|
+
)
|
|
91
128
|
command_arr, command_str = prepare_benchmark_parameters_specif_tooling(
|
|
92
129
|
benchmark_tool,
|
|
93
130
|
cluster_api_enabled,
|
|
@@ -104,10 +141,13 @@ def prepare_benchmark_parameters(
|
|
|
104
141
|
private_key,
|
|
105
142
|
client_ssh_port,
|
|
106
143
|
redis_password,
|
|
144
|
+
input_file_url,
|
|
107
145
|
)
|
|
108
146
|
# v0.4 spec
|
|
109
147
|
elif type(benchmark_config[config_key]) == dict:
|
|
110
148
|
entry = benchmark_config[config_key]
|
|
149
|
+
# Extract input file URL from parameters
|
|
150
|
+
input_file_url = extract_input_file_url_from_parameters(entry, benchmark_tool)
|
|
111
151
|
command_arr, command_str = prepare_benchmark_parameters_specif_tooling(
|
|
112
152
|
benchmark_tool,
|
|
113
153
|
cluster_api_enabled,
|
|
@@ -124,6 +164,7 @@ def prepare_benchmark_parameters(
|
|
|
124
164
|
private_key,
|
|
125
165
|
client_ssh_port,
|
|
126
166
|
redis_password,
|
|
167
|
+
input_file_url,
|
|
127
168
|
)
|
|
128
169
|
printed_command_str = command_str
|
|
129
170
|
printed_command_arr = command_arr
|
|
@@ -154,6 +195,7 @@ def prepare_benchmark_parameters_specif_tooling(
|
|
|
154
195
|
private_key,
|
|
155
196
|
client_ssh_port,
|
|
156
197
|
redis_password=None,
|
|
198
|
+
input_file_url=None,
|
|
157
199
|
):
|
|
158
200
|
if "redis-benchmark" in benchmark_tool:
|
|
159
201
|
command_arr, command_str = prepare_redis_benchmark_command(
|
|
@@ -207,7 +249,7 @@ def prepare_benchmark_parameters_specif_tooling(
|
|
|
207
249
|
input_data_file = None
|
|
208
250
|
if isremote is True:
|
|
209
251
|
benchmark_tool = "/tmp/{}".format(benchmark_tool)
|
|
210
|
-
input_data_file =
|
|
252
|
+
input_data_file = get_remote_input_file_from_url(input_file_url)
|
|
211
253
|
(
|
|
212
254
|
command_arr,
|
|
213
255
|
command_str,
|
|
@@ -260,7 +302,7 @@ def prepare_benchmark_parameters_specif_tooling(
|
|
|
260
302
|
input_data_file = None
|
|
261
303
|
if isremote is True:
|
|
262
304
|
benchmark_tool = "/tmp/{}".format(benchmark_tool)
|
|
263
|
-
input_data_file =
|
|
305
|
+
input_data_file = get_remote_input_file_from_url(input_file_url)
|
|
264
306
|
(
|
|
265
307
|
command_arr,
|
|
266
308
|
command_str,
|
|
@@ -280,7 +322,7 @@ def prepare_benchmark_parameters_specif_tooling(
|
|
|
280
322
|
input_data_file = None
|
|
281
323
|
if isremote is True:
|
|
282
324
|
benchmark_tool = "/tmp/{}".format(benchmark_tool)
|
|
283
|
-
input_data_file =
|
|
325
|
+
input_data_file = get_remote_input_file_from_url(input_file_url)
|
|
284
326
|
(
|
|
285
327
|
command_arr,
|
|
286
328
|
command_str,
|
|
@@ -28,6 +28,7 @@ from redisbench_admin.utils.remote import (
|
|
|
28
28
|
extract_redisgraph_version_from_resultdict,
|
|
29
29
|
)
|
|
30
30
|
from redisbench_admin.utils.results import post_process_benchmark_results
|
|
31
|
+
from redisbench_admin.utils.utils import get_remote_input_file_from_url
|
|
31
32
|
|
|
32
33
|
|
|
33
34
|
def absoluteFilePaths(directory):
|
|
@@ -166,7 +167,7 @@ def remote_tool_pre_bench_step(
|
|
|
166
167
|
queries_file_link, remote_tool_link, tool_link
|
|
167
168
|
)
|
|
168
169
|
)
|
|
169
|
-
remote_input_file =
|
|
170
|
+
remote_input_file = get_remote_input_file_from_url(queries_file_link)
|
|
170
171
|
setup_remote_benchmark_tool_requirements_ftsb(
|
|
171
172
|
client_public_ip,
|
|
172
173
|
username,
|
|
@@ -191,7 +192,7 @@ def remote_tool_pre_bench_step(
|
|
|
191
192
|
"redisearch",
|
|
192
193
|
"go-ycsb",
|
|
193
194
|
)
|
|
194
|
-
remote_input_file =
|
|
195
|
+
remote_input_file = get_remote_input_file_from_url(queries_file_link)
|
|
195
196
|
setup_remote_benchmark_tool_requirements_tsbs(
|
|
196
197
|
client_public_ip,
|
|
197
198
|
username,
|
|
@@ -211,7 +212,7 @@ def remote_tool_pre_bench_step(
|
|
|
211
212
|
) = extract_remote_tool_extra_links(
|
|
212
213
|
benchmark_config, benchmark_tool, config_key, os_str, arch_str
|
|
213
214
|
)
|
|
214
|
-
remote_input_file =
|
|
215
|
+
remote_input_file = get_remote_input_file_from_url(queries_file_link)
|
|
215
216
|
setup_remote_benchmark_tool_requirements_tsbs(
|
|
216
217
|
client_public_ip,
|
|
217
218
|
username,
|
|
@@ -228,7 +229,7 @@ def remote_tool_pre_bench_step(
|
|
|
228
229
|
remote_tool_link,
|
|
229
230
|
tool_link,
|
|
230
231
|
) = extract_aibench_extra_links(benchmark_config, benchmark_tool)
|
|
231
|
-
remote_input_file =
|
|
232
|
+
remote_input_file = get_remote_input_file_from_url(queries_file_link)
|
|
232
233
|
setup_remote_benchmark_tool_requirements_tsbs(
|
|
233
234
|
client_public_ip,
|
|
234
235
|
username,
|
redisbench_admin/utils/utils.py
CHANGED
|
@@ -11,10 +11,12 @@ import logging
|
|
|
11
11
|
import operator
|
|
12
12
|
import os
|
|
13
13
|
import os.path
|
|
14
|
+
import re
|
|
14
15
|
import tarfile
|
|
15
16
|
import time
|
|
16
17
|
from functools import reduce
|
|
17
|
-
from
|
|
18
|
+
from pathlib import PurePosixPath
|
|
19
|
+
from urllib.parse import quote_plus, urlparse, unquote
|
|
18
20
|
from zipfile import ZipFile
|
|
19
21
|
|
|
20
22
|
import boto3
|
|
@@ -484,6 +486,60 @@ def make_dashboard_callback(
|
|
|
484
486
|
)
|
|
485
487
|
|
|
486
488
|
|
|
489
|
+
def get_remote_input_file_from_url(url):
|
|
490
|
+
"""
|
|
491
|
+
Generate a unique remote input file path based on the file name from the URL.
|
|
492
|
+
This ensures each input file has its own path and avoids reuse issues between benchmark runs.
|
|
493
|
+
|
|
494
|
+
Example:
|
|
495
|
+
url = "https://s3.amazonaws.com/.../AND_QUERY.CSV"
|
|
496
|
+
returns "/tmp/input-AND_QUERY.data"
|
|
497
|
+
|
|
498
|
+
Args:
|
|
499
|
+
url: The URL or path to the input file
|
|
500
|
+
|
|
501
|
+
Returns:
|
|
502
|
+
A unique remote file path like /tmp/input-{file_name}.data,
|
|
503
|
+
or "/tmp/input.data" as fallback if url is None or empty
|
|
504
|
+
"""
|
|
505
|
+
default_path = PurePosixPath("/tmp/input.data")
|
|
506
|
+
|
|
507
|
+
if url is None or url == "":
|
|
508
|
+
return str(default_path)
|
|
509
|
+
|
|
510
|
+
# Parse the URL to extract the path component
|
|
511
|
+
# This handles both http(s):// URLs and s3:// URIs
|
|
512
|
+
parsed = urlparse(url)
|
|
513
|
+
url_path = parsed.path if parsed.path else url
|
|
514
|
+
|
|
515
|
+
# Use PurePosixPath to extract the file name (works for both URLs and paths)
|
|
516
|
+
path = PurePosixPath(url_path)
|
|
517
|
+
file_name = path.name
|
|
518
|
+
|
|
519
|
+
# If no file name could be extracted, return default
|
|
520
|
+
if not file_name:
|
|
521
|
+
return str(default_path)
|
|
522
|
+
|
|
523
|
+
# Decode URL-encoded characters (e.g., %3A -> :)
|
|
524
|
+
file_name = unquote(file_name)
|
|
525
|
+
|
|
526
|
+
# Remove extension using pathlib's stem property
|
|
527
|
+
base_name = PurePosixPath(file_name).stem
|
|
528
|
+
|
|
529
|
+
# If stem is empty (e.g., hidden file like ".data"), use the full name
|
|
530
|
+
if not base_name:
|
|
531
|
+
base_name = file_name
|
|
532
|
+
|
|
533
|
+
# Sanitize the base name: replace characters that might cause issues in file paths
|
|
534
|
+
# Keep only alphanumeric, underscore, hyphen, and dot
|
|
535
|
+
base_name = re.sub(r"[^a-zA-Z0-9_\-.]", "_", base_name)
|
|
536
|
+
|
|
537
|
+
# Construct the final path using PurePosixPath for proper path joining
|
|
538
|
+
result_path = PurePosixPath("/tmp") / f"input-{base_name}.data"
|
|
539
|
+
|
|
540
|
+
return str(result_path)
|
|
541
|
+
|
|
542
|
+
|
|
487
543
|
EC2_REGION = os.getenv("AWS_DEFAULT_REGION", None)
|
|
488
544
|
EC2_SECRET_KEY = os.getenv("AWS_SECRET_ACCESS_KEY", None)
|
|
489
545
|
EC2_PRIVATE_PEM = os.getenv("EC2_PRIVATE_PEM", None)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: redisbench-admin
|
|
3
|
-
Version: 0.11.
|
|
3
|
+
Version: 0.11.73
|
|
4
4
|
Summary: Redis benchmark run helper. A wrapper around Redis and Redis Modules benchmark tools ( ftsb_redisearch, memtier_benchmark, redis-benchmark, aibench, etc... ).
|
|
5
5
|
License-File: LICENSE
|
|
6
6
|
Author: filipecosta90
|
|
@@ -51,7 +51,7 @@ redisbench_admin/run/ann/ann.py,sha256=h8VE7fouyNkpMSjNhgjkI_R-aWb-lKIKxvNZPOO8p
|
|
|
51
51
|
redisbench_admin/run/args.py,sha256=7flScWAFEbJAJ7YfBgPmxlFGLwTNPQmG2DnNTGFD5h8,8504
|
|
52
52
|
redisbench_admin/run/asm.py,sha256=Hybna8Xs7SnsP2IBwg6kMsiGPoCK0TlvhyKX94XmOEs,16738
|
|
53
53
|
redisbench_admin/run/cluster.py,sha256=GBIe1NtgvT2Yq0vkYlqweTi2k7kxAI87qU6T5WNUf6E,8965
|
|
54
|
-
redisbench_admin/run/common.py,sha256=
|
|
54
|
+
redisbench_admin/run/common.py,sha256=TBznI_IWEJYKnWb2FPI4pgww2JRntUc4IriLMB2j7Oo,30814
|
|
55
55
|
redisbench_admin/run/ftsb/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
|
|
56
56
|
redisbench_admin/run/ftsb/ftsb.py,sha256=0SS4InU7e9x-yZ0u-D1yOYJ0u0G37IwVWwiK78LRXE8,2712
|
|
57
57
|
redisbench_admin/run/git.py,sha256=6UYGcTN0MPzf4QDVoJnFkou0yZasLF6jLG7f0zoySq8,3064
|
|
@@ -94,7 +94,7 @@ redisbench_admin/run_remote/remote_client.py,sha256=rRmDro1weto01wzqYpId8NMPoizE
|
|
|
94
94
|
redisbench_admin/run_remote/remote_db.py,sha256=iDcIqDPskl2hgZm1yP2DTBnSnwvpze8hEmim97uKJ3Y,15643
|
|
95
95
|
redisbench_admin/run_remote/remote_env.py,sha256=Ux_0QT1unNRlKl3cakzjG5Px1uuxOOfBoF_pnalx_T8,4936
|
|
96
96
|
redisbench_admin/run_remote/remote_failures.py,sha256=IOo6DyxarcwwMPCeN4gWB2JrhuC9iBLwq0nCROqr5ak,1567
|
|
97
|
-
redisbench_admin/run_remote/remote_helpers.py,sha256=
|
|
97
|
+
redisbench_admin/run_remote/remote_helpers.py,sha256=nuTGasAfDarkZajrSt36a8QCEB0vycAyR8qbOqwlrXI,13717
|
|
98
98
|
redisbench_admin/run_remote/run_remote.py,sha256=PVNfdaa8jW8Pjn0zknNSVcMA0fvv-Y8Y3waaL3xp6cw,78745
|
|
99
99
|
redisbench_admin/run_remote/standalone.py,sha256=JzB-YPKkCp7IwNqULHBn4oRItn4bDHfyTGesTLLh5O0,34813
|
|
100
100
|
redisbench_admin/run_remote/terraform.py,sha256=vV3eWXNwj7vsnFNqUgCir5ueZS4VYopEyzWiTtoSq0Q,4018
|
|
@@ -106,12 +106,12 @@ redisbench_admin/utils/redisgraph_benchmark_go.py,sha256=os7EJt6kBxsFJLKkSoANbjM
|
|
|
106
106
|
redisbench_admin/utils/remote.py,sha256=Kjz1VQfy1Y7jQwef26vz5KYhHrUxMHtMXXvgPmTjGy4,45206
|
|
107
107
|
redisbench_admin/utils/results.py,sha256=uKk3uNJ--bSXlUj_HGQ2OaV6MVqmXJVM8xTzFV6EOw4,3267
|
|
108
108
|
redisbench_admin/utils/ssh.py,sha256=QW4AwlocMHJt05QMdN_4f8WeDmxiEwR80ny8VBThq6k,6533
|
|
109
|
-
redisbench_admin/utils/utils.py,sha256=
|
|
109
|
+
redisbench_admin/utils/utils.py,sha256=YG7I8bXlxA4RO6NUp9UyPCl0MaXYlYGFqCCIg2PvUjA,17824
|
|
110
110
|
redisbench_admin/watchdog/__init__.py,sha256=cD7zfXt0VEmy0b7452HvcAxX_9kVj6Vm213yNdUHP20,95
|
|
111
111
|
redisbench_admin/watchdog/args.py,sha256=nKsG1G6ATOZlAMHMtT9u3kXxduKCbejSZ5x8oB_ynZ8,1312
|
|
112
112
|
redisbench_admin/watchdog/watchdog.py,sha256=0wWYge3x_OMxWrzazNhJif2NK4tKsI963HVZqjczRag,6189
|
|
113
|
-
redisbench_admin-0.11.
|
|
114
|
-
redisbench_admin-0.11.
|
|
115
|
-
redisbench_admin-0.11.
|
|
116
|
-
redisbench_admin-0.11.
|
|
117
|
-
redisbench_admin-0.11.
|
|
113
|
+
redisbench_admin-0.11.73.dist-info/METADATA,sha256=Wa6nGTUYi878yMi3PPtjNruXYilxfQNQo8xhhH_WfRw,5724
|
|
114
|
+
redisbench_admin-0.11.73.dist-info/WHEEL,sha256=kJCRJT_g0adfAJzTx2GUMmS80rTJIVHRCfG0DQgLq3o,88
|
|
115
|
+
redisbench_admin-0.11.73.dist-info/entry_points.txt,sha256=UUawXk_AS-PlieKJ1QxPQXGsRLb6OW_F0MtmA1W0KE8,113
|
|
116
|
+
redisbench_admin-0.11.73.dist-info/licenses/LICENSE,sha256=AAMtfs82zOOvmG68vILivm6lxi2rcOlGObmA8jzxQvw,10768
|
|
117
|
+
redisbench_admin-0.11.73.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|