redisbench-admin 0.11.46__py3-none-any.whl → 0.11.48__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.
@@ -76,6 +76,7 @@ def export_command_logic(args, project_name, project_version):
76
76
  exporter_timemetric_path,
77
77
  _,
78
78
  _,
79
+ _,
79
80
  ) = get_defaults(exporter_spec_file)
80
81
  arch = args.architecture
81
82
  logging.info("Using the following architecture on the timeseries: {}".format(arch))
@@ -41,6 +41,7 @@ class BenchmarkClass:
41
41
  self.exporter_timemetric_path,
42
42
  self.default_specs,
43
43
  self.clusterconfig,
44
+ _,
44
45
  ) = prepare_benchmark_definitions(args)
45
46
 
46
47
  def populate_remote_envs_timeout(self):
@@ -149,6 +149,7 @@ def run_local_command_logic(args, project_name, project_version):
149
149
  exporter_timemetric_path,
150
150
  default_specs,
151
151
  clusterconfig,
152
+ _,
152
153
  ) = prepare_benchmark_definitions(args)
153
154
 
154
155
  return_code = 0
@@ -124,6 +124,108 @@ def remote_db_spin(
124
124
  benchmark_config, server_public_ip, username, private_key, db_ssh_port
125
125
  )
126
126
 
127
+ # Copy custom Redis files to remote host if provided
128
+ remote_redis_server_path = None
129
+ remote_redis_conf_path = None
130
+
131
+ if custom_redis_server_path or custom_redis_conf_path:
132
+ from redisbench_admin.utils.remote import copy_file_to_remote_setup
133
+ import os
134
+
135
+ if custom_redis_conf_path:
136
+ # Convert relative paths to absolute paths
137
+ custom_redis_conf_path = os.path.abspath(
138
+ os.path.expanduser(custom_redis_conf_path)
139
+ )
140
+
141
+ if not os.path.exists(custom_redis_conf_path):
142
+ logging.error(
143
+ f"❌ Custom redis.conf file not found: {custom_redis_conf_path}"
144
+ )
145
+ return_code = 1
146
+ return (None, None, None, [], [], return_code, None, None)
147
+
148
+ remote_redis_conf_path = "/tmp/redis.conf"
149
+ logging.info(
150
+ f"📁 Copying custom redis.conf from {custom_redis_conf_path} to {remote_redis_conf_path}"
151
+ )
152
+
153
+ copy_result = copy_file_to_remote_setup(
154
+ server_public_ip,
155
+ username,
156
+ private_key,
157
+ custom_redis_conf_path,
158
+ remote_redis_conf_path,
159
+ None,
160
+ db_ssh_port,
161
+ False, # don't continue on error
162
+ )
163
+
164
+ if not copy_result:
165
+ logging.error("❌ Failed to copy redis.conf to remote host")
166
+ return_code = 1
167
+ return (None, None, None, [], [], return_code, None, None)
168
+ else:
169
+ logging.info(
170
+ f"✅ Successfully copied redis.conf to {remote_redis_conf_path}"
171
+ )
172
+
173
+ if custom_redis_server_path:
174
+ # Convert relative paths to absolute paths
175
+ custom_redis_server_path = os.path.abspath(
176
+ os.path.expanduser(custom_redis_server_path)
177
+ )
178
+
179
+ if not os.path.exists(custom_redis_server_path):
180
+ logging.error(
181
+ f"❌ Custom redis-server binary not found: {custom_redis_server_path}"
182
+ )
183
+ return_code = 1
184
+ return (None, None, None, [], [], return_code, None, None)
185
+
186
+ remote_redis_server_path = "/tmp/redis-server"
187
+ logging.info(
188
+ f"📁 Copying custom redis-server binary from {custom_redis_server_path} to {remote_redis_server_path}"
189
+ )
190
+
191
+ copy_result = copy_file_to_remote_setup(
192
+ server_public_ip,
193
+ username,
194
+ private_key,
195
+ custom_redis_server_path,
196
+ remote_redis_server_path,
197
+ None,
198
+ db_ssh_port,
199
+ False, # don't continue on error
200
+ )
201
+
202
+ if not copy_result:
203
+ logging.error("❌ Failed to copy redis-server binary to remote host")
204
+ return_code = 1
205
+ return (None, None, None, [], [], return_code, None, None)
206
+
207
+ # Make the binary executable
208
+ chmod_commands = [f"chmod +x {remote_redis_server_path}"]
209
+ chmod_results = execute_remote_commands(
210
+ server_public_ip, username, private_key, chmod_commands, db_ssh_port
211
+ )
212
+
213
+ recv_exit_status, stdout, stderr = chmod_results[0]
214
+ if recv_exit_status != 0:
215
+ logging.warning(
216
+ f"⚠️ Failed to make redis-server binary executable: {stderr}"
217
+ )
218
+ else:
219
+ logging.info(
220
+ f"✅ Successfully copied and made executable: {remote_redis_server_path}"
221
+ )
222
+
223
+ # Update the custom paths to use the remote paths
224
+ if remote_redis_server_path:
225
+ custom_redis_server_path = remote_redis_server_path
226
+ if remote_redis_conf_path:
227
+ custom_redis_conf_path = remote_redis_conf_path
228
+
127
229
  full_logfiles = []
128
230
  cluster_enabled = False
129
231
  if setup_type == "oss-cluster":
@@ -320,6 +320,7 @@ def run_remote_command_logic(args, project_name, project_version):
320
320
  exporter_timemetric_path,
321
321
  default_specs,
322
322
  clusterconfig,
323
+ _,
323
324
  ) = prepare_benchmark_definitions(args)
324
325
 
325
326
  return_code = 0
@@ -13,7 +13,6 @@ from redisbench_admin.utils.remote import (
13
13
  )
14
14
  from redisbench_admin.utils.ssh import SSHSession
15
15
  from redisbench_admin.utils.utils import redis_server_config_module_part
16
- import tempfile
17
16
 
18
17
 
19
18
  def ensure_redis_server_available(server_public_ip, username, private_key, port=22):
@@ -280,8 +279,19 @@ def spin_up_standalone_remote_redis(
280
279
  custom_redis_server_path=None,
281
280
  custom_redis_conf_path=None,
282
281
  ):
283
- # Ensure redis-server is available before trying to start it
284
- ensure_redis_server_available(server_public_ip, username, private_key, port)
282
+ # Ensure redis-server is available before trying to start it (only if not using custom binary)
283
+ if custom_redis_server_path is None:
284
+ ensure_redis_server_available(server_public_ip, username, private_key, port)
285
+ else:
286
+ logging.info(
287
+ "🔧 Using custom Redis binary - skipping system Redis installation"
288
+ )
289
+
290
+ # Log what paths we're using
291
+ logging.info("🔧 Redis command generation:")
292
+ logging.info(f" - Custom server path: {custom_redis_server_path}")
293
+ logging.info(f" - Custom config path: {custom_redis_conf_path}")
294
+ logging.info(f" - Module files: {remote_module_files}")
285
295
 
286
296
  full_logfile, initial_redis_cmd = generate_remote_standalone_redis_cmd(
287
297
  logfile,
@@ -611,7 +621,7 @@ def spin_test_standalone_redis(
611
621
  )
612
622
  return False
613
623
 
614
- remote_redis_conf_path = f"{temporary_dir}/redis.conf"
624
+ remote_redis_conf_path = "/tmp/redis.conf"
615
625
  logging.info(
616
626
  f"📁 Copying custom redis.conf from {custom_redis_conf_path} to {remote_redis_conf_path}"
617
627
  )
@@ -647,7 +657,7 @@ def spin_test_standalone_redis(
647
657
  )
648
658
  return False
649
659
 
650
- remote_redis_server_path = f"{temporary_dir}/redis-server"
660
+ remote_redis_server_path = "/tmp/redis-server"
651
661
  logging.info(
652
662
  f"📁 Copying custom redis-server binary from {custom_redis_server_path} to {remote_redis_server_path}"
653
663
  )
@@ -710,7 +720,7 @@ def spin_test_standalone_redis(
710
720
  logfile = "redis-spin-test.log"
711
721
 
712
722
  # Log what paths we're using
713
- logging.info(f"🔧 Redis command generation:")
723
+ logging.info("🔧 Redis command generation:")
714
724
  logging.info(f" - Custom server path: {remote_redis_server_path}")
715
725
  logging.info(f" - Custom config path: {remote_redis_conf_path}")
716
726
  logging.info(f" - Module files: {remote_module_files}")
@@ -92,6 +92,7 @@ def prepare_benchmark_definitions(args):
92
92
  exporter_timemetric_path,
93
93
  default_specs,
94
94
  clusterconfig,
95
+ default_dbconfig,
95
96
  )
96
97
 
97
98
 
@@ -57,8 +57,42 @@ def get_git_root(path):
57
57
 
58
58
  def view_bar_simple(a, b):
59
59
  res = a / int(b) * 100
60
- sys.stdout.write("\r Complete percent: %.2f %%" % res)
61
- sys.stdout.flush()
60
+ # Only update progress every 5% to reduce output frequency
61
+ if not hasattr(view_bar_simple, 'last_percent'):
62
+ view_bar_simple.last_percent = 0
63
+
64
+ if res - view_bar_simple.last_percent >= 5.0 or res >= 100.0:
65
+ sys.stdout.write("\r Complete percent: %.2f %%" % res)
66
+ sys.stdout.flush()
67
+ view_bar_simple.last_percent = res
68
+
69
+
70
+ class ProgressCallback:
71
+ """A more configurable progress callback for file transfers"""
72
+
73
+ def __init__(self, update_threshold=5.0, show_bytes=False):
74
+ """
75
+ Args:
76
+ update_threshold: Minimum percentage change before showing update (default: 5.0%)
77
+ show_bytes: Whether to show bytes transferred (default: False)
78
+ """
79
+ self.last_percent = 0
80
+ self.update_threshold = update_threshold
81
+ self.show_bytes = show_bytes
82
+
83
+ def __call__(self, transferred, total):
84
+ percent = (transferred / total) * 100
85
+
86
+ if (percent - self.last_percent >= self.update_threshold or
87
+ percent >= 100.0 or
88
+ self.last_percent == 0):
89
+
90
+ if self.show_bytes:
91
+ sys.stdout.write(f"\r Progress: {percent:.1f}% ({transferred}/{total} bytes)")
92
+ else:
93
+ sys.stdout.write(f"\r Complete percent: {percent:.2f}%%")
94
+ sys.stdout.flush()
95
+ self.last_percent = percent
62
96
 
63
97
 
64
98
  def copy_file_to_remote_setup(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: redisbench-admin
3
- Version: 0.11.46
3
+ Version: 0.11.48
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
  Author: filipecosta90
6
6
  Author-email: filipecosta.90@gmail.com
@@ -15,7 +15,7 @@ redisbench_admin/export/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8z
15
15
  redisbench_admin/export/args.py,sha256=v_WjJCNz_LeIFMNwSN6XwRmvSx1K2ys8XS1gK50EM_4,3508
16
16
  redisbench_admin/export/common/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
17
17
  redisbench_admin/export/common/common.py,sha256=LnvXjMLlJRzMTxiFIjrfRFfDx9JJm88OZHu7lnTOpFA,4331
18
- redisbench_admin/export/export.py,sha256=u00NjaCbWhCJ319leVlP4ZkqiqZt5FN4Gbag4Poo23M,11274
18
+ redisbench_admin/export/export.py,sha256=E_suYdkQopVn6HGYMUGl0OvzKlaWcQbemFzdFxSwKy4,11293
19
19
  redisbench_admin/export/google_benchmark/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
20
20
  redisbench_admin/export/google_benchmark/google_benchmark_json_format.py,sha256=OuMaMmmma5VvXA0rcLIQSMxIq81oa5I3xYDFhbWj-IA,1804
21
21
  redisbench_admin/export/memtier_benchmark/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
@@ -200,7 +200,7 @@ redisbench_admin/run/ycsb/ycsb.py,sha256=cs5saVH7C4YpDvzhoa15PwEho59qTVR1E90v_FY
200
200
  redisbench_admin/run_async/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
201
201
  redisbench_admin/run_async/async_env.py,sha256=tE1turaaZNHfOaSpGxh62EJWp88zoQFUf3sMbaS7JRA,2408
202
202
  redisbench_admin/run_async/async_terraform.py,sha256=ngOQnECUuC20pZwiJItaiBnzlwT2DiKciPTHtqLURe4,11299
203
- redisbench_admin/run_async/benchmark.py,sha256=S-dsaWGjgsPQxj8sXAACnbtNw5zlJnRFoo53ULbrMEY,1630
203
+ redisbench_admin/run_async/benchmark.py,sha256=ea1V_lNYzsa4EXbh0_Ecsf3IFPlnNzo29Pdho35BgLg,1645
204
204
  redisbench_admin/run_async/log.py,sha256=cD7zfXt0VEmy0b7452HvcAxX_9kVj6Vm213yNdUHP20,95
205
205
  redisbench_admin/run_async/render_files.py,sha256=NMagmx-2hsMET_XN8tkmQz55g-azqW7SjAqaq4GL8F0,2676
206
206
  redisbench_admin/run_async/run_async.py,sha256=g2ZOQqj9vXZYaRyNpJZtgfYyY9tMuRmEv3Hh3qWOUs8,14525
@@ -209,34 +209,34 @@ redisbench_admin/run_local/args.py,sha256=LPpqtx1cH1dkkeHjYlaFnAp_TijxnzPZFO2CmY
209
209
  redisbench_admin/run_local/local_client.py,sha256=gwawMDOBrf7m--uyxu8kMZC5LBiLjbUBSKvzVOdOAas,124
210
210
  redisbench_admin/run_local/local_db.py,sha256=9vINqKOs-wDMFEuEHT0I8KO9YnEo_h4NWNk5da3LwSY,7518
211
211
  redisbench_admin/run_local/local_helpers.py,sha256=JyqLW2-Sbm35BXjxxfOB1yK7ADdLfcVrq08NLNdIwac,7026
212
- redisbench_admin/run_local/run_local.py,sha256=QHnGfVAaVuct7t0WrWyQpbirC3MWX7fQF5-kXU_pJBs,34834
212
+ redisbench_admin/run_local/run_local.py,sha256=OrzfzCvOcQ1JLGfNZcChE1SsQCUDMHctzOHNF6a-xtA,34845
213
213
  redisbench_admin/run_remote/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
214
214
  redisbench_admin/run_remote/args.py,sha256=P7azI3m5jJJBovD9rLCvFWjVNveMcu7FVZbEUjdDn0c,4866
215
215
  redisbench_admin/run_remote/consts.py,sha256=bCMkwyeBD-EmOpoHKni7LjWy5WuaxGJhGhqpi4AL0RQ,386
216
216
  redisbench_admin/run_remote/log.py,sha256=cD7zfXt0VEmy0b7452HvcAxX_9kVj6Vm213yNdUHP20,95
217
217
  redisbench_admin/run_remote/notifications.py,sha256=-W9fLaftEFNfplBl2clHk37jbYxliDbHftQ62khN31k,2157
218
218
  redisbench_admin/run_remote/remote_client.py,sha256=rRmDro1weto01wzqYpId8NMPoizEzSyudXBCjYrBVMs,14128
219
- redisbench_admin/run_remote/remote_db.py,sha256=LjN24dISrXdJeNovP4KZfC1Xi-prDMfYb7MiwZWrxOA,15034
219
+ redisbench_admin/run_remote/remote_db.py,sha256=VNsJmJf7803gsCd_lhwCb37V-xd_mC25TdDMiB3diW8,18972
220
220
  redisbench_admin/run_remote/remote_env.py,sha256=Ux_0QT1unNRlKl3cakzjG5Px1uuxOOfBoF_pnalx_T8,4936
221
221
  redisbench_admin/run_remote/remote_failures.py,sha256=IOo6DyxarcwwMPCeN4gWB2JrhuC9iBLwq0nCROqr5ak,1567
222
222
  redisbench_admin/run_remote/remote_helpers.py,sha256=skWeGyDJBmyx_UwUekT3N3_nOJvF2-Hvu-E7vKlO9gg,10598
223
- redisbench_admin/run_remote/run_remote.py,sha256=dAR2HRA6pl4jFdRM6YF1iAsLfuy1TZ8nn3s6QdOdv2k,76591
224
- redisbench_admin/run_remote/standalone.py,sha256=NF8Az9ZJfdRk6aP5_t8MxraUkpGRU_OYae3w93NngiA,32885
223
+ redisbench_admin/run_remote/run_remote.py,sha256=4IvKwjWRV0vubC-S388_m6W9oy-OtmbApzode7tp1Dw,76602
224
+ redisbench_admin/run_remote/standalone.py,sha256=dEidNJIprjRiFQqAAM-drYsks2ZZLjRKLs0Y4bfKe-w,33338
225
225
  redisbench_admin/run_remote/terraform.py,sha256=vV3eWXNwj7vsnFNqUgCir5ueZS4VYopEyzWiTtoSq0Q,4018
226
226
  redisbench_admin/utils/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
227
- redisbench_admin/utils/benchmark_config.py,sha256=e1rvziZpI_8_vC4RKL5Rbwv1A4DKOXiv7xbFTrrAy88,23843
227
+ redisbench_admin/utils/benchmark_config.py,sha256=71n2gm8ObeCBzNWQ0MLO7zRjIvmIzg7xuSE2-CZygcw,23869
228
228
  redisbench_admin/utils/local.py,sha256=zUvyVI9LZMT3qyxs1pO3mXL6Bt_1z9EZUGppaRcWNRA,3890
229
229
  redisbench_admin/utils/redisearch.py,sha256=lchUEzpt0zB1rHwlDlw9LLifAnxFWcLP-PePw7TjL-0,1602
230
230
  redisbench_admin/utils/redisgraph_benchmark_go.py,sha256=os7EJt6kBxsFJLKkSoANbjMT7-cEq4-Ns-49alk2Tf8,2048
231
- redisbench_admin/utils/remote.py,sha256=RAQ2VxfmlK7swN7ujCuwSI2soGSycjnxbQw_IrLxIFE,42205
231
+ redisbench_admin/utils/remote.py,sha256=-spZFP9-sChXd-EjBU_OeDuJsFq4LpyXiDhP--070mM,43487
232
232
  redisbench_admin/utils/results.py,sha256=uKk3uNJ--bSXlUj_HGQ2OaV6MVqmXJVM8xTzFV6EOw4,3267
233
233
  redisbench_admin/utils/ssh.py,sha256=QW4AwlocMHJt05QMdN_4f8WeDmxiEwR80ny8VBThq6k,6533
234
234
  redisbench_admin/utils/utils.py,sha256=XVSvo1_DdcYwk2jOxL3VPVPbnDnhGYt8ieYfANo6rTo,15085
235
235
  redisbench_admin/watchdog/__init__.py,sha256=cD7zfXt0VEmy0b7452HvcAxX_9kVj6Vm213yNdUHP20,95
236
236
  redisbench_admin/watchdog/args.py,sha256=nKsG1G6ATOZlAMHMtT9u3kXxduKCbejSZ5x8oB_ynZ8,1312
237
237
  redisbench_admin/watchdog/watchdog.py,sha256=0wWYge3x_OMxWrzazNhJif2NK4tKsI963HVZqjczRag,6189
238
- redisbench_admin-0.11.46.dist-info/LICENSE,sha256=AAMtfs82zOOvmG68vILivm6lxi2rcOlGObmA8jzxQvw,10768
239
- redisbench_admin-0.11.46.dist-info/METADATA,sha256=k4Y3_EPcMPHVDlqK7o7kcf4xE2P9H_gN_4CIkgkc0P4,5596
240
- redisbench_admin-0.11.46.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
241
- redisbench_admin-0.11.46.dist-info/entry_points.txt,sha256=UUawXk_AS-PlieKJ1QxPQXGsRLb6OW_F0MtmA1W0KE8,113
242
- redisbench_admin-0.11.46.dist-info/RECORD,,
238
+ redisbench_admin-0.11.48.dist-info/LICENSE,sha256=AAMtfs82zOOvmG68vILivm6lxi2rcOlGObmA8jzxQvw,10768
239
+ redisbench_admin-0.11.48.dist-info/METADATA,sha256=8wFuMRH-WXIhRr6BxIq3-IwpieN60sShDuKt6OagSR0,5596
240
+ redisbench_admin-0.11.48.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
241
+ redisbench_admin-0.11.48.dist-info/entry_points.txt,sha256=UUawXk_AS-PlieKJ1QxPQXGsRLb6OW_F0MtmA1W0KE8,113
242
+ redisbench_admin-0.11.48.dist-info/RECORD,,