redisbench-admin 0.11.59__py3-none-any.whl → 0.11.61__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/args.py +7 -0
- redisbench_admin/run/cluster.py +29 -4
- redisbench_admin/run_remote/args.py +28 -0
- redisbench_admin/run_remote/remote_db.py +23 -0
- redisbench_admin/run_remote/remote_helpers.py +1 -1
- redisbench_admin/run_remote/run_remote.py +46 -1
- redisbench_admin/run_remote/standalone.py +134 -0
- redisbench_admin/utils/remote.py +13 -6
- {redisbench_admin-0.11.59.dist-info → redisbench_admin-0.11.61.dist-info}/METADATA +1 -1
- {redisbench_admin-0.11.59.dist-info → redisbench_admin-0.11.61.dist-info}/RECORD +13 -13
- {redisbench_admin-0.11.59.dist-info → redisbench_admin-0.11.61.dist-info}/WHEEL +1 -1
- {redisbench_admin-0.11.59.dist-info → redisbench_admin-0.11.61.dist-info}/entry_points.txt +0 -0
- {redisbench_admin-0.11.59.dist-info → redisbench_admin-0.11.61.dist-info}/licenses/LICENSE +0 -0
redisbench_admin/run/args.py
CHANGED
|
@@ -38,6 +38,7 @@ GIT_BRANCH = os.getenv("GIT_BRANCH", None)
|
|
|
38
38
|
GIT_REPO = os.getenv("GIT_REPO", None)
|
|
39
39
|
PROFILERS_ENABLED = bool(int(os.getenv("PROFILE", 0)))
|
|
40
40
|
COMMANDSTATS_ENABLED = bool(int(os.getenv("COMMANDSTATS_ENABLED", 1)))
|
|
41
|
+
SEARCH_MEMORY_ENABLED = bool(int(os.getenv("SEARCH_MEMORY_ENABLED", 0)))
|
|
41
42
|
PROFILERS = os.getenv("PROFILERS", PROFILERS_DEFAULT)
|
|
42
43
|
MAX_PROFILERS_PER_TYPE = int(os.getenv("MAX_PROFILERS", 1))
|
|
43
44
|
PROFILE_FREQ = os.getenv("PROFILE_FREQ", PROFILE_FREQ_DEFAULT)
|
|
@@ -202,6 +203,12 @@ def common_run_args(parser):
|
|
|
202
203
|
default=COMMANDSTATS_ENABLED,
|
|
203
204
|
help="Enables commandstats collection.",
|
|
204
205
|
)
|
|
206
|
+
parser.add_argument(
|
|
207
|
+
"--collect_search_memory",
|
|
208
|
+
type=bool,
|
|
209
|
+
default=SEARCH_MEMORY_ENABLED,
|
|
210
|
+
help="Enables search memory collection.",
|
|
211
|
+
)
|
|
205
212
|
parser.add_argument(
|
|
206
213
|
"--allowed-envs",
|
|
207
214
|
type=str,
|
redisbench_admin/run/cluster.py
CHANGED
|
@@ -114,13 +114,32 @@ def spin_up_redis_cluster_remote_redis(
|
|
|
114
114
|
modules_configuration_parameters_map,
|
|
115
115
|
logname,
|
|
116
116
|
redis_7=True,
|
|
117
|
+
remote_symlinks=None,
|
|
118
|
+
ld_library_paths=None,
|
|
117
119
|
):
|
|
118
|
-
# Import the
|
|
119
|
-
from redisbench_admin.run_remote.standalone import
|
|
120
|
+
# Import the functions from standalone module
|
|
121
|
+
from redisbench_admin.run_remote.standalone import (
|
|
122
|
+
ensure_redis_server_available,
|
|
123
|
+
setup_remote_symlinks,
|
|
124
|
+
build_ld_library_path_prefix,
|
|
125
|
+
)
|
|
120
126
|
|
|
121
127
|
# Ensure redis-server is available before trying to start cluster
|
|
122
128
|
ensure_redis_server_available(server_public_ip, username, private_key, ssh_port)
|
|
123
129
|
|
|
130
|
+
# Setup symlinks on remote server if specified
|
|
131
|
+
if remote_symlinks:
|
|
132
|
+
symlink_success = setup_remote_symlinks(
|
|
133
|
+
server_public_ip, username, private_key, remote_symlinks, ssh_port
|
|
134
|
+
)
|
|
135
|
+
if not symlink_success:
|
|
136
|
+
logging.warning("Some symlinks failed to create, continuing anyway...")
|
|
137
|
+
|
|
138
|
+
# Build LD_LIBRARY_PATH prefix if specified
|
|
139
|
+
ld_prefix = build_ld_library_path_prefix(ld_library_paths)
|
|
140
|
+
if ld_prefix:
|
|
141
|
+
logging.info(f"Using LD_LIBRARY_PATH prefix: {ld_prefix}")
|
|
142
|
+
|
|
124
143
|
logging.info("Generating the remote redis-server command arguments")
|
|
125
144
|
redis_process_commands = []
|
|
126
145
|
logfiles = []
|
|
@@ -141,13 +160,19 @@ def spin_up_redis_cluster_remote_redis(
|
|
|
141
160
|
"yes",
|
|
142
161
|
redis_7,
|
|
143
162
|
)
|
|
163
|
+
# Prepend LD_LIBRARY_PATH if specified
|
|
164
|
+
if ld_prefix:
|
|
165
|
+
full_command = ld_prefix + " ".join(command)
|
|
166
|
+
else:
|
|
167
|
+
full_command = " ".join(command)
|
|
144
168
|
logging.error(
|
|
145
169
|
"Remote primary shard {} command: {}".format(
|
|
146
|
-
master_shard_id,
|
|
170
|
+
master_shard_id, full_command
|
|
147
171
|
)
|
|
148
172
|
)
|
|
149
173
|
logfiles.append(logfile)
|
|
150
|
-
redis_process_commands.append(
|
|
174
|
+
redis_process_commands.append(full_command)
|
|
175
|
+
|
|
151
176
|
res = execute_remote_commands(
|
|
152
177
|
server_public_ip, username, private_key, redis_process_commands, ssh_port
|
|
153
178
|
)
|
|
@@ -150,5 +150,33 @@ def create_run_remote_arguments(parser):
|
|
|
150
150
|
action="store_true",
|
|
151
151
|
help="Setup standalone Redis server, run INFO SERVER, print output as markdown and exit",
|
|
152
152
|
)
|
|
153
|
+
parser.add_argument(
|
|
154
|
+
"--remote_symlink",
|
|
155
|
+
required=False,
|
|
156
|
+
default=None,
|
|
157
|
+
action="append",
|
|
158
|
+
help="Create a symlink on the remote server. Format: 'source:target'. "
|
|
159
|
+
"Example: --remote_symlink '/tmp/libfoo.so:/usr/lib/libfoo.so'. "
|
|
160
|
+
"You can use --remote_symlink more than once.",
|
|
161
|
+
)
|
|
162
|
+
parser.add_argument(
|
|
163
|
+
"--ld_library_path",
|
|
164
|
+
required=False,
|
|
165
|
+
default=None,
|
|
166
|
+
action="append",
|
|
167
|
+
help="Add a path to LD_LIBRARY_PATH on the remote server when starting Redis. "
|
|
168
|
+
"Example: --ld_library_path '/tmp'. "
|
|
169
|
+
"You can use --ld_library_path more than once.",
|
|
170
|
+
)
|
|
171
|
+
parser.add_argument(
|
|
172
|
+
"--extra_lib",
|
|
173
|
+
required=False,
|
|
174
|
+
default=None,
|
|
175
|
+
action="append",
|
|
176
|
+
help="Path to extra library files to copy to the remote server. "
|
|
177
|
+
"These are NOT passed as modules to redis-server, but are available for LD_LIBRARY_PATH. "
|
|
178
|
+
"Example: --extra_lib '/path/to/libfoo.so'. "
|
|
179
|
+
"You can use --extra_lib more than once.",
|
|
180
|
+
)
|
|
153
181
|
|
|
154
182
|
return parser
|
|
@@ -105,6 +105,9 @@ def remote_db_spin(
|
|
|
105
105
|
continue_on_module_check_error=False,
|
|
106
106
|
keyspace_check_timeout=60,
|
|
107
107
|
architecture="x86_64",
|
|
108
|
+
remote_symlinks=None,
|
|
109
|
+
ld_library_paths=None,
|
|
110
|
+
extra_libs=None,
|
|
108
111
|
):
|
|
109
112
|
(
|
|
110
113
|
_,
|
|
@@ -137,6 +140,22 @@ def remote_db_spin(
|
|
|
137
140
|
continue_on_module_check_error,
|
|
138
141
|
)
|
|
139
142
|
logging.info(f"final remote module files {remote_module_files}...")
|
|
143
|
+
# Copy extra library files to remote (these are NOT passed to redis-server)
|
|
144
|
+
if extra_libs:
|
|
145
|
+
logging.info(
|
|
146
|
+
f"Copying {len(extra_libs)} extra library files to remote host..."
|
|
147
|
+
)
|
|
148
|
+
# Reuse remote_module_files_cp but discard the result (we don't pass these to redis)
|
|
149
|
+
remote_module_files_cp(
|
|
150
|
+
extra_libs,
|
|
151
|
+
db_ssh_port,
|
|
152
|
+
private_key,
|
|
153
|
+
remote_module_file_dir,
|
|
154
|
+
server_public_ip,
|
|
155
|
+
username,
|
|
156
|
+
continue_on_module_check_error,
|
|
157
|
+
)
|
|
158
|
+
logging.info("Extra library files copied successfully (not passed to redis-server)")
|
|
140
159
|
# setup Redis
|
|
141
160
|
redis_setup_result = True
|
|
142
161
|
redis_conns = []
|
|
@@ -157,6 +176,8 @@ def remote_db_spin(
|
|
|
157
176
|
modules_configuration_parameters_map,
|
|
158
177
|
logname,
|
|
159
178
|
redis_7,
|
|
179
|
+
remote_symlinks,
|
|
180
|
+
ld_library_paths,
|
|
160
181
|
)
|
|
161
182
|
try:
|
|
162
183
|
for p in range(cluster_start_port, cluster_start_port + shard_count):
|
|
@@ -207,6 +228,8 @@ def remote_db_spin(
|
|
|
207
228
|
db_ssh_port,
|
|
208
229
|
modules_configuration_parameters_map,
|
|
209
230
|
redis_7,
|
|
231
|
+
remote_symlinks,
|
|
232
|
+
ld_library_paths,
|
|
210
233
|
)
|
|
211
234
|
full_logfiles.append(full_logfile)
|
|
212
235
|
local_redis_conn, ssh_tunnel = ssh_tunnel_redisconn(
|
|
@@ -276,7 +276,7 @@ def _setup_remote_benchmark_tool_requirements(
|
|
|
276
276
|
else:
|
|
277
277
|
logging.info("No queries file link provided. Skipping download.")
|
|
278
278
|
execute_remote_commands(
|
|
279
|
-
client_public_ip, username, private_key, commands, client_ssh_port
|
|
279
|
+
client_public_ip, username, private_key, commands, client_ssh_port, limit_output_print=True,
|
|
280
280
|
)
|
|
281
281
|
|
|
282
282
|
|
|
@@ -89,6 +89,15 @@ STALL_INFO_DAYS = 7
|
|
|
89
89
|
EXPIRE_TIME_SECS_PROFILE_KEYS = 60 * 60 * 24 * STALL_INFO_DAYS
|
|
90
90
|
EXPIRE_TIME_MSECS_PROFILE_KEYS = EXPIRE_TIME_SECS_PROFILE_KEYS * 1000
|
|
91
91
|
|
|
92
|
+
def ensure_mixed_types_first(benchmark_runs_plan):
|
|
93
|
+
"""
|
|
94
|
+
Returns an iterator over (benchmark_type, bench_by_dataset_map) tuples,
|
|
95
|
+
ensuring that 'mixed' benchmark types are processed before others.
|
|
96
|
+
"""
|
|
97
|
+
return sorted(
|
|
98
|
+
benchmark_runs_plan.items(),
|
|
99
|
+
key=lambda x: (x[0] != "mixed", x[0])
|
|
100
|
+
)
|
|
92
101
|
|
|
93
102
|
def is_important_data(tf_github_branch, artifact_version):
|
|
94
103
|
return True
|
|
@@ -108,6 +117,7 @@ def run_remote_command_logic(args, project_name, project_version):
|
|
|
108
117
|
tf_github_branch = args.github_branch
|
|
109
118
|
required_modules = args.required_module
|
|
110
119
|
collect_commandstats = args.collect_commandstats
|
|
120
|
+
collect_search_memory = args.collect_search_memory
|
|
111
121
|
|
|
112
122
|
(
|
|
113
123
|
tf_github_actor,
|
|
@@ -143,6 +153,9 @@ def run_remote_command_logic(args, project_name, project_version):
|
|
|
143
153
|
cluster_start_port = 20000
|
|
144
154
|
redis_password = args.db_pass
|
|
145
155
|
ignore_keyspace_errors = args.ignore_keyspace_errors
|
|
156
|
+
remote_symlinks = args.remote_symlink
|
|
157
|
+
ld_library_paths = args.ld_library_path
|
|
158
|
+
extra_libs = args.extra_lib
|
|
146
159
|
if WH_TOKEN is not None:
|
|
147
160
|
webhook_notifications_active = True
|
|
148
161
|
|
|
@@ -282,6 +295,9 @@ def run_remote_command_logic(args, project_name, project_version):
|
|
|
282
295
|
modules_configuration_parameters_map=None,
|
|
283
296
|
custom_redis_conf_path=args.redis_conf,
|
|
284
297
|
custom_redis_server_path=args.redis_server_binary,
|
|
298
|
+
remote_symlinks=args.remote_symlink,
|
|
299
|
+
ld_library_paths=args.ld_library_path,
|
|
300
|
+
extra_libs=args.extra_lib,
|
|
285
301
|
)
|
|
286
302
|
|
|
287
303
|
exit(0 if success else 1)
|
|
@@ -389,7 +405,7 @@ def run_remote_command_logic(args, project_name, project_version):
|
|
|
389
405
|
ts_key_full_price = f"ts:{tf_triggering_env}:tests:full_price"
|
|
390
406
|
ts_key_architecture = f"ts:{tf_triggering_env}:tests:arch:{architecture}"
|
|
391
407
|
|
|
392
|
-
for benchmark_type, bench_by_dataset_map in benchmark_runs_plan
|
|
408
|
+
for benchmark_type, bench_by_dataset_map in ensure_mixed_types_first(benchmark_runs_plan):
|
|
393
409
|
if return_code != 0 and args.fail_fast:
|
|
394
410
|
logging.warning(
|
|
395
411
|
"Given you've selected fail fast skipping benchmark_type {}".format(
|
|
@@ -638,6 +654,9 @@ def run_remote_command_logic(args, project_name, project_version):
|
|
|
638
654
|
continue_on_module_check_error,
|
|
639
655
|
60,
|
|
640
656
|
architecture,
|
|
657
|
+
remote_symlinks,
|
|
658
|
+
ld_library_paths,
|
|
659
|
+
extra_libs,
|
|
641
660
|
)
|
|
642
661
|
if benchmark_type == "read-only":
|
|
643
662
|
ro_benchmark_set(
|
|
@@ -987,6 +1006,32 @@ def run_remote_command_logic(args, project_name, project_version):
|
|
|
987
1006
|
},
|
|
988
1007
|
expire_ms,
|
|
989
1008
|
)
|
|
1009
|
+
if collect_search_memory:
|
|
1010
|
+
(
|
|
1011
|
+
end_time_ms,
|
|
1012
|
+
_,
|
|
1013
|
+
overall_search_memory_metrics,
|
|
1014
|
+
) = collect_redis_metrics(
|
|
1015
|
+
redis_conns, ["search_memory"]
|
|
1016
|
+
)
|
|
1017
|
+
export_redis_metrics(
|
|
1018
|
+
artifact_version,
|
|
1019
|
+
end_time_ms,
|
|
1020
|
+
overall_search_memory_metrics,
|
|
1021
|
+
rts,
|
|
1022
|
+
setup_name,
|
|
1023
|
+
setup_type,
|
|
1024
|
+
test_name,
|
|
1025
|
+
tf_github_branch,
|
|
1026
|
+
tf_github_org,
|
|
1027
|
+
tf_github_repo,
|
|
1028
|
+
tf_triggering_env,
|
|
1029
|
+
{
|
|
1030
|
+
"metric-type": "search-memory",
|
|
1031
|
+
"arch": architecture,
|
|
1032
|
+
},
|
|
1033
|
+
expire_ms,
|
|
1034
|
+
)
|
|
990
1035
|
if collect_commandstats:
|
|
991
1036
|
(
|
|
992
1037
|
end_time_ms,
|
|
@@ -15,6 +15,78 @@ from redisbench_admin.utils.ssh import SSHSession
|
|
|
15
15
|
from redisbench_admin.utils.utils import redis_server_config_module_part
|
|
16
16
|
|
|
17
17
|
|
|
18
|
+
def setup_remote_symlinks(
|
|
19
|
+
server_public_ip, username, private_key, remote_symlinks, port=22
|
|
20
|
+
):
|
|
21
|
+
"""
|
|
22
|
+
Create symlinks on the remote server.
|
|
23
|
+
|
|
24
|
+
Args:
|
|
25
|
+
server_public_ip: IP address of the remote server
|
|
26
|
+
username: SSH username
|
|
27
|
+
private_key: Path to SSH private key
|
|
28
|
+
remote_symlinks: List of symlink specifications in format "source:target"
|
|
29
|
+
port: SSH port (default 22)
|
|
30
|
+
|
|
31
|
+
Returns:
|
|
32
|
+
bool: True if all symlinks were created successfully, False otherwise
|
|
33
|
+
"""
|
|
34
|
+
if remote_symlinks is None or len(remote_symlinks) == 0:
|
|
35
|
+
return True
|
|
36
|
+
|
|
37
|
+
logging.info(f"Setting up {len(remote_symlinks)} symlink(s) on remote server...")
|
|
38
|
+
commands = []
|
|
39
|
+
|
|
40
|
+
for symlink_spec in remote_symlinks:
|
|
41
|
+
if ":" not in symlink_spec:
|
|
42
|
+
logging.error(
|
|
43
|
+
f"Invalid symlink specification '{symlink_spec}'. "
|
|
44
|
+
"Expected format: 'source:target'"
|
|
45
|
+
)
|
|
46
|
+
return False
|
|
47
|
+
|
|
48
|
+
source, target = symlink_spec.split(":", 1)
|
|
49
|
+
logging.info(f"Will create symlink: {target} -> {source}")
|
|
50
|
+
# Use ln -sf to force creation (overwrite if exists)
|
|
51
|
+
commands.append(f"ln -sf {source} {target}")
|
|
52
|
+
|
|
53
|
+
results = execute_remote_commands(
|
|
54
|
+
server_public_ip, username, private_key, commands, port
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
success = True
|
|
58
|
+
for pos, res_pos in enumerate(results):
|
|
59
|
+
[recv_exit_status, stdout, stderr] = res_pos
|
|
60
|
+
if recv_exit_status != 0:
|
|
61
|
+
logging.error(
|
|
62
|
+
f"Failed to create symlink '{remote_symlinks[pos]}'. "
|
|
63
|
+
f"Exit code: {recv_exit_status}, stderr: {stderr}"
|
|
64
|
+
)
|
|
65
|
+
success = False
|
|
66
|
+
else:
|
|
67
|
+
logging.info(f"Successfully created symlink: {remote_symlinks[pos]}")
|
|
68
|
+
|
|
69
|
+
return success
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def build_ld_library_path_prefix(ld_library_paths):
|
|
73
|
+
"""
|
|
74
|
+
Build the LD_LIBRARY_PATH prefix for a command.
|
|
75
|
+
|
|
76
|
+
Args:
|
|
77
|
+
ld_library_paths: List of paths to add to LD_LIBRARY_PATH, or None
|
|
78
|
+
|
|
79
|
+
Returns:
|
|
80
|
+
str: The LD_LIBRARY_PATH prefix string (e.g., "LD_LIBRARY_PATH=/tmp:/usr/lib:$LD_LIBRARY_PATH ")
|
|
81
|
+
or empty string if no paths specified
|
|
82
|
+
"""
|
|
83
|
+
if ld_library_paths is None or len(ld_library_paths) == 0:
|
|
84
|
+
return ""
|
|
85
|
+
|
|
86
|
+
paths_str = ":".join(ld_library_paths)
|
|
87
|
+
return f"LD_LIBRARY_PATH={paths_str}:$LD_LIBRARY_PATH "
|
|
88
|
+
|
|
89
|
+
|
|
18
90
|
def ensure_redis_server_available(server_public_ip, username, private_key, port=22):
|
|
19
91
|
"""Check if redis-server is available, install if not"""
|
|
20
92
|
logging.info("Checking if redis-server is available on remote server...")
|
|
@@ -276,10 +348,20 @@ def spin_up_standalone_remote_redis(
|
|
|
276
348
|
port=22,
|
|
277
349
|
modules_configuration_parameters_map={},
|
|
278
350
|
redis_7=True,
|
|
351
|
+
remote_symlinks=None,
|
|
352
|
+
ld_library_paths=None,
|
|
279
353
|
):
|
|
280
354
|
# Ensure redis-server is available before trying to start it
|
|
281
355
|
ensure_redis_server_available(server_public_ip, username, private_key, port)
|
|
282
356
|
|
|
357
|
+
# Setup symlinks on remote server if specified
|
|
358
|
+
if remote_symlinks:
|
|
359
|
+
symlink_success = setup_remote_symlinks(
|
|
360
|
+
server_public_ip, username, private_key, remote_symlinks, port
|
|
361
|
+
)
|
|
362
|
+
if not symlink_success:
|
|
363
|
+
logging.warning("Some symlinks failed to create, continuing anyway...")
|
|
364
|
+
|
|
283
365
|
full_logfile, initial_redis_cmd = generate_remote_standalone_redis_cmd(
|
|
284
366
|
logfile,
|
|
285
367
|
redis_configuration_parameters,
|
|
@@ -289,6 +371,12 @@ def spin_up_standalone_remote_redis(
|
|
|
289
371
|
redis_7,
|
|
290
372
|
)
|
|
291
373
|
|
|
374
|
+
# Prepend LD_LIBRARY_PATH if specified
|
|
375
|
+
ld_prefix = build_ld_library_path_prefix(ld_library_paths)
|
|
376
|
+
if ld_prefix:
|
|
377
|
+
logging.info(f"Using LD_LIBRARY_PATH prefix: {ld_prefix}")
|
|
378
|
+
initial_redis_cmd = ld_prefix + initial_redis_cmd
|
|
379
|
+
|
|
292
380
|
# start redis-server
|
|
293
381
|
commands = [initial_redis_cmd]
|
|
294
382
|
res = execute_remote_commands(
|
|
@@ -467,6 +555,9 @@ def spin_test_standalone_redis(
|
|
|
467
555
|
modules_configuration_parameters_map=None,
|
|
468
556
|
custom_redis_conf_path=None,
|
|
469
557
|
custom_redis_server_path=None,
|
|
558
|
+
remote_symlinks=None,
|
|
559
|
+
ld_library_paths=None,
|
|
560
|
+
extra_libs=None,
|
|
470
561
|
):
|
|
471
562
|
"""
|
|
472
563
|
Setup standalone Redis server, run INFO SERVER, print output as markdown and exit.
|
|
@@ -482,6 +573,9 @@ def spin_test_standalone_redis(
|
|
|
482
573
|
modules_configuration_parameters_map: Dict of module configuration parameters
|
|
483
574
|
custom_redis_conf_path: Path to custom redis.conf file
|
|
484
575
|
custom_redis_server_path: Path to custom redis-server binary
|
|
576
|
+
remote_symlinks: List of symlink specifications in format "source:target"
|
|
577
|
+
ld_library_paths: List of paths to add to LD_LIBRARY_PATH
|
|
578
|
+
extra_libs: List of extra library files to copy (not passed to redis-server)
|
|
485
579
|
"""
|
|
486
580
|
logging.info("🚀 Starting spin-test mode...")
|
|
487
581
|
|
|
@@ -594,6 +688,40 @@ def spin_test_standalone_redis(
|
|
|
594
688
|
continue_on_module_check_error=True,
|
|
595
689
|
)
|
|
596
690
|
|
|
691
|
+
# Copy extra library files (NOT passed to redis-server)
|
|
692
|
+
if extra_libs:
|
|
693
|
+
# Ensure module dir exists for extra libs too
|
|
694
|
+
if not local_module_files:
|
|
695
|
+
remote_module_file_dir = f"{temporary_dir}/modules"
|
|
696
|
+
create_module_dir_commands = [f"mkdir -p {remote_module_file_dir}"]
|
|
697
|
+
execute_remote_commands(
|
|
698
|
+
server_public_ip,
|
|
699
|
+
username,
|
|
700
|
+
private_key,
|
|
701
|
+
create_module_dir_commands,
|
|
702
|
+
db_ssh_port,
|
|
703
|
+
)
|
|
704
|
+
logging.info(f"📁 Copying {len(extra_libs)} extra library files to remote...")
|
|
705
|
+
# Copy extra libs but discard result (not passed to redis-server)
|
|
706
|
+
remote_module_files_cp(
|
|
707
|
+
extra_libs,
|
|
708
|
+
db_ssh_port,
|
|
709
|
+
private_key,
|
|
710
|
+
remote_module_file_dir,
|
|
711
|
+
server_public_ip,
|
|
712
|
+
username,
|
|
713
|
+
continue_on_module_check_error=True,
|
|
714
|
+
)
|
|
715
|
+
logging.info("✅ Extra library files copied (not passed to redis-server)")
|
|
716
|
+
|
|
717
|
+
# Setup symlinks on remote server if specified
|
|
718
|
+
if remote_symlinks:
|
|
719
|
+
symlink_success = setup_remote_symlinks(
|
|
720
|
+
server_public_ip, username, private_key, remote_symlinks, db_ssh_port
|
|
721
|
+
)
|
|
722
|
+
if not symlink_success:
|
|
723
|
+
logging.warning("⚠️ Some symlinks failed to create, continuing anyway...")
|
|
724
|
+
|
|
597
725
|
# Generate Redis startup command
|
|
598
726
|
logfile = "redis-spin-test.log"
|
|
599
727
|
full_logfile, redis_cmd = generate_remote_standalone_redis_cmd(
|
|
@@ -612,6 +740,12 @@ def spin_test_standalone_redis(
|
|
|
612
740
|
if redis_port != 6379:
|
|
613
741
|
redis_cmd += f" --port {redis_port}"
|
|
614
742
|
|
|
743
|
+
# Prepend LD_LIBRARY_PATH if specified
|
|
744
|
+
ld_prefix = build_ld_library_path_prefix(ld_library_paths)
|
|
745
|
+
if ld_prefix:
|
|
746
|
+
logging.info(f"🔧 Using LD_LIBRARY_PATH prefix: {ld_prefix}")
|
|
747
|
+
redis_cmd = ld_prefix + redis_cmd
|
|
748
|
+
|
|
615
749
|
logging.info(f"🔧 Starting Redis with command: {redis_cmd}")
|
|
616
750
|
|
|
617
751
|
# Start Redis server
|
redisbench_admin/utils/remote.py
CHANGED
|
@@ -151,7 +151,7 @@ def fetch_file_from_remote_setup(
|
|
|
151
151
|
|
|
152
152
|
|
|
153
153
|
def execute_remote_commands(
|
|
154
|
-
server_public_ip, username, private_key, commands, port, get_pty=False
|
|
154
|
+
server_public_ip, username, private_key, commands, port, get_pty=False, limit_output_print=False,
|
|
155
155
|
):
|
|
156
156
|
res = []
|
|
157
157
|
c = connect_remote_ssh(port, private_key, server_public_ip, username)
|
|
@@ -162,11 +162,18 @@ def execute_remote_commands(
|
|
|
162
162
|
stdout = stdout.readlines()
|
|
163
163
|
stderr = stderr.readlines()
|
|
164
164
|
if recv_exit_status != 0:
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
165
|
+
if not limit_output_print:
|
|
166
|
+
logging.warning(
|
|
167
|
+
"Exit status: {} for command {}.\n\tSTDERR: {}\n\tSTDOUT: {}".format(
|
|
168
|
+
recv_exit_status, command, stdout, stderr
|
|
169
|
+
)
|
|
170
|
+
)
|
|
171
|
+
else:
|
|
172
|
+
logging.info(
|
|
173
|
+
"Exit status: {} for command {}.\n\tSTDERR: {}\n\tSTDOUT: {}".format(
|
|
174
|
+
recv_exit_status, command, stdout[0:100], stderr[0:100]
|
|
175
|
+
)
|
|
176
|
+
)
|
|
170
177
|
res.append([recv_exit_status, stdout, stderr])
|
|
171
178
|
c.close()
|
|
172
179
|
return res
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: redisbench-admin
|
|
3
|
-
Version: 0.11.
|
|
3
|
+
Version: 0.11.61
|
|
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
|
|
@@ -48,9 +48,9 @@ redisbench_admin/run/aibench_run_inference_redisai_vision/__init__.py,sha256=DtB
|
|
|
48
48
|
redisbench_admin/run/aibench_run_inference_redisai_vision/aibench_run_inference_redisai_vision.py,sha256=03GDbZZSo21f9iBTcNTdBKQAfq_Ghd0zxr-KYe1QIMU,1917
|
|
49
49
|
redisbench_admin/run/ann/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
|
|
50
50
|
redisbench_admin/run/ann/ann.py,sha256=h8VE7fouyNkpMSjNhgjkI_R-aWb-lKIKxvNZPOO8pFY,1288
|
|
51
|
-
redisbench_admin/run/args.py,sha256=
|
|
51
|
+
redisbench_admin/run/args.py,sha256=w6kVMHXFMCMtMvIBAFm3AHcJya3iGOblSze_8sfosog,8466
|
|
52
52
|
redisbench_admin/run/asm.py,sha256=Hybna8Xs7SnsP2IBwg6kMsiGPoCK0TlvhyKX94XmOEs,16738
|
|
53
|
-
redisbench_admin/run/cluster.py,sha256=
|
|
53
|
+
redisbench_admin/run/cluster.py,sha256=Q5CgixcXIWSohPXoNUpR7Hy5NoHCBSGtQHscM8YYYys,7206
|
|
54
54
|
redisbench_admin/run/common.py,sha256=1zJPQtIk3tjvLTjNUgxvDdcviN73psiaDBQ8cRJMIl8,29341
|
|
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
|
|
@@ -86,32 +86,32 @@ redisbench_admin/run_local/local_db.py,sha256=9vINqKOs-wDMFEuEHT0I8KO9YnEo_h4NWN
|
|
|
86
86
|
redisbench_admin/run_local/local_helpers.py,sha256=JyqLW2-Sbm35BXjxxfOB1yK7ADdLfcVrq08NLNdIwac,7026
|
|
87
87
|
redisbench_admin/run_local/run_local.py,sha256=TIGhSp4UaVZtoUxKMwS4BMeE7dNQJm9ODBtsDjcGrbI,35333
|
|
88
88
|
redisbench_admin/run_remote/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
|
|
89
|
-
redisbench_admin/run_remote/args.py,sha256=
|
|
89
|
+
redisbench_admin/run_remote/args.py,sha256=7tsaqwFjd0_1_irCGGt1DUKR8LxccmYlWulE-6tn9cY,5891
|
|
90
90
|
redisbench_admin/run_remote/consts.py,sha256=bCMkwyeBD-EmOpoHKni7LjWy5WuaxGJhGhqpi4AL0RQ,386
|
|
91
91
|
redisbench_admin/run_remote/log.py,sha256=cD7zfXt0VEmy0b7452HvcAxX_9kVj6Vm213yNdUHP20,95
|
|
92
92
|
redisbench_admin/run_remote/notifications.py,sha256=-W9fLaftEFNfplBl2clHk37jbYxliDbHftQ62khN31k,2157
|
|
93
93
|
redisbench_admin/run_remote/remote_client.py,sha256=rRmDro1weto01wzqYpId8NMPoizEzSyudXBCjYrBVMs,14128
|
|
94
|
-
redisbench_admin/run_remote/remote_db.py,sha256=
|
|
94
|
+
redisbench_admin/run_remote/remote_db.py,sha256=xje_KTC7fbDfBYdtoHZhElv7Bgx5ug4PhpHA-1JyV10,15490
|
|
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=
|
|
98
|
-
redisbench_admin/run_remote/run_remote.py,sha256=
|
|
99
|
-
redisbench_admin/run_remote/standalone.py,sha256=
|
|
97
|
+
redisbench_admin/run_remote/remote_helpers.py,sha256=RPbFlAppOP_4HlJUb4TTuaj4e3LUdIzOiClPxf0zJY0,13297
|
|
98
|
+
redisbench_admin/run_remote/run_remote.py,sha256=Jiu5rSg6OeBizTQxHvON86jWF-tvViyi2tp9ubSu_Ew,78142
|
|
99
|
+
redisbench_admin/run_remote/standalone.py,sha256=GpUoonBa79tOMel16iVnV7DprHR2jfLtLL_F9i1MMhU,32986
|
|
100
100
|
redisbench_admin/run_remote/terraform.py,sha256=vV3eWXNwj7vsnFNqUgCir5ueZS4VYopEyzWiTtoSq0Q,4018
|
|
101
101
|
redisbench_admin/utils/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
|
|
102
102
|
redisbench_admin/utils/benchmark_config.py,sha256=SREplEGIfPtR9NKIjJXb5pug-ikbJDsDMpZ9UM5sg0M,22676
|
|
103
103
|
redisbench_admin/utils/local.py,sha256=uVU91Bvk3FAaDGmTIbI0zXYd1K24A9-Xwm15xI_SYC4,4086
|
|
104
104
|
redisbench_admin/utils/redisearch.py,sha256=lchUEzpt0zB1rHwlDlw9LLifAnxFWcLP-PePw7TjL-0,1602
|
|
105
105
|
redisbench_admin/utils/redisgraph_benchmark_go.py,sha256=os7EJt6kBxsFJLKkSoANbjMT7-cEq4-Ns-49alk2Tf8,2048
|
|
106
|
-
redisbench_admin/utils/remote.py,sha256=
|
|
106
|
+
redisbench_admin/utils/remote.py,sha256=L0Nr8H_bJivk1-Dp3Jy9JVpDUrHuuCiBsAZ5Rb3HuUQ,43206
|
|
107
107
|
redisbench_admin/utils/results.py,sha256=uKk3uNJ--bSXlUj_HGQ2OaV6MVqmXJVM8xTzFV6EOw4,3267
|
|
108
108
|
redisbench_admin/utils/ssh.py,sha256=QW4AwlocMHJt05QMdN_4f8WeDmxiEwR80ny8VBThq6k,6533
|
|
109
109
|
redisbench_admin/utils/utils.py,sha256=XVSvo1_DdcYwk2jOxL3VPVPbnDnhGYt8ieYfANo6rTo,15085
|
|
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.61.dist-info/METADATA,sha256=YWtfP7r9vSRIG6a_7J_OU5gYxdiajF8Em3GV_ohbEvU,5724
|
|
114
|
+
redisbench_admin-0.11.61.dist-info/WHEEL,sha256=3ny-bZhpXrU6vSQ1UPG34FoxZBp3lVcvK0LkgUz6VLk,88
|
|
115
|
+
redisbench_admin-0.11.61.dist-info/entry_points.txt,sha256=UUawXk_AS-PlieKJ1QxPQXGsRLb6OW_F0MtmA1W0KE8,113
|
|
116
|
+
redisbench_admin-0.11.61.dist-info/licenses/LICENSE,sha256=AAMtfs82zOOvmG68vILivm6lxi2rcOlGObmA8jzxQvw,10768
|
|
117
|
+
redisbench_admin-0.11.61.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|