redisbench-admin 0.11.47__py3-none-any.whl → 0.11.49__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))
@@ -48,3 +48,82 @@ def exists_check(error_message, local_module_file, status):
48
48
  "Confirmed that module artifact: '{}' exists!".format(local_module_file)
49
49
  )
50
50
  return error_message, status
51
+
52
+
53
+ def redis_files_check(redis_server_binary_path, redis_conf_path):
54
+ """
55
+ Check if custom Redis server binary and config file paths exist.
56
+
57
+ Args:
58
+ redis_server_binary_path: Path to custom redis-server binary (can be None)
59
+ redis_conf_path: Path to custom redis.conf file (can be None)
60
+
61
+ Returns:
62
+ tuple: (status, error_message) where status is True if all files exist
63
+ """
64
+ status = True
65
+ error_message = ""
66
+
67
+ if redis_server_binary_path is not None:
68
+ # Convert relative paths to absolute paths
69
+ redis_server_binary_path = os.path.abspath(os.path.expanduser(redis_server_binary_path))
70
+ logging.info(
71
+ "Checking if custom Redis server binary {} exists...".format(redis_server_binary_path)
72
+ )
73
+ if not os.path.exists(redis_server_binary_path):
74
+ error_message = "Specified Redis server binary does not exist: {}".format(
75
+ redis_server_binary_path
76
+ )
77
+ logging.error(error_message)
78
+ status = False
79
+ elif not os.path.isfile(redis_server_binary_path):
80
+ error_message = "Specified Redis server binary path is not a file: {}".format(
81
+ redis_server_binary_path
82
+ )
83
+ logging.error(error_message)
84
+ status = False
85
+ elif not os.access(redis_server_binary_path, os.X_OK):
86
+ error_message = "Specified Redis server binary is not executable: {}".format(
87
+ redis_server_binary_path
88
+ )
89
+ logging.error(error_message)
90
+ status = False
91
+ else:
92
+ logging.info(
93
+ "✅ Confirmed that Redis server binary: '{}' exists and is executable!".format(
94
+ redis_server_binary_path
95
+ )
96
+ )
97
+
98
+ if redis_conf_path is not None:
99
+ # Convert relative paths to absolute paths
100
+ redis_conf_path = os.path.abspath(os.path.expanduser(redis_conf_path))
101
+ logging.info(
102
+ "Checking if custom Redis config file {} exists...".format(redis_conf_path)
103
+ )
104
+ if not os.path.exists(redis_conf_path):
105
+ error_message = "Specified Redis config file does not exist: {}".format(
106
+ redis_conf_path
107
+ )
108
+ logging.error(error_message)
109
+ status = False
110
+ elif not os.path.isfile(redis_conf_path):
111
+ error_message = "Specified Redis config file path is not a file: {}".format(
112
+ redis_conf_path
113
+ )
114
+ logging.error(error_message)
115
+ status = False
116
+ elif not os.access(redis_conf_path, os.R_OK):
117
+ error_message = "Specified Redis config file is not readable: {}".format(
118
+ redis_conf_path
119
+ )
120
+ logging.error(error_message)
121
+ status = False
122
+ else:
123
+ logging.info(
124
+ "✅ Confirmed that Redis config file: '{}' exists and is readable!".format(
125
+ redis_conf_path
126
+ )
127
+ )
128
+
129
+ return status, error_message
@@ -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
@@ -35,7 +35,7 @@ from redisbench_admin.run.common import (
35
35
  )
36
36
  from redisbench_admin.run.git import git_vars_crosscheck
37
37
  from redisbench_admin.run.grafana import generate_artifacts_table_grafana_redis
38
- from redisbench_admin.run.modules import redis_modules_check
38
+ from redisbench_admin.run.modules import redis_modules_check, redis_files_check
39
39
  from redisbench_admin.run.redistimeseries import (
40
40
  timeseries_test_sucess_flow,
41
41
  timeseries_test_failure_flow,
@@ -229,6 +229,25 @@ def run_remote_command_logic(args, project_name, project_version):
229
229
  )
230
230
  )
231
231
 
232
+ # Validate Redis server binary and config file paths early
233
+ redis_files_check_status, redis_error_message = redis_files_check(
234
+ args.redis_server_binary, args.redis_conf
235
+ )
236
+ if redis_files_check_status is False:
237
+ if webhook_notifications_active:
238
+ failure_reason = redis_error_message
239
+ generate_failure_notification(
240
+ webhook_client_slack,
241
+ ci_job_name,
242
+ ci_job_link,
243
+ failure_reason,
244
+ tf_github_org,
245
+ tf_github_repo,
246
+ tf_github_branch,
247
+ None,
248
+ )
249
+ exit(1)
250
+
232
251
  common_properties_log(
233
252
  tf_bin_path,
234
253
  tf_github_actor,
@@ -320,6 +339,7 @@ def run_remote_command_logic(args, project_name, project_version):
320
339
  exporter_timemetric_path,
321
340
  default_specs,
322
341
  clusterconfig,
342
+ _,
323
343
  ) = prepare_benchmark_definitions(args)
324
344
 
325
345
  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):
@@ -289,7 +288,7 @@ def spin_up_standalone_remote_redis(
289
288
  )
290
289
 
291
290
  # Log what paths we're using
292
- logging.info(f"🔧 Redis command generation:")
291
+ logging.info("🔧 Redis command generation:")
293
292
  logging.info(f" - Custom server path: {custom_redis_server_path}")
294
293
  logging.info(f" - Custom config path: {custom_redis_conf_path}")
295
294
  logging.info(f" - Module files: {remote_module_files}")
@@ -721,7 +720,7 @@ def spin_test_standalone_redis(
721
720
  logfile = "redis-spin-test.log"
722
721
 
723
722
  # Log what paths we're using
724
- logging.info(f"🔧 Redis command generation:")
723
+ logging.info("🔧 Redis command generation:")
725
724
  logging.info(f" - Custom server path: {remote_redis_server_path}")
726
725
  logging.info(f" - Custom config path: {remote_redis_conf_path}")
727
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,46 @@ 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 (
87
+ percent - self.last_percent >= self.update_threshold
88
+ or percent >= 100.0
89
+ or self.last_percent == 0
90
+ ):
91
+
92
+ if self.show_bytes:
93
+ sys.stdout.write(
94
+ f"\r Progress: {percent:.1f}% ({transferred}/{total} bytes)"
95
+ )
96
+ else:
97
+ sys.stdout.write(f"\r Complete percent: {percent:.2f}%%")
98
+ sys.stdout.flush()
99
+ self.last_percent = percent
62
100
 
63
101
 
64
102
  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.47
3
+ Version: 0.11.49
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
@@ -184,7 +184,7 @@ redisbench_admin/run/grafana.py,sha256=iMDgMyJKinpZMTD43rZ1IcRGkadjFjCxaB48mYWkv
184
184
  redisbench_admin/run/memtier_benchmark/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
185
185
  redisbench_admin/run/memtier_benchmark/memtier_benchmark.py,sha256=wTd2olovvFBZ98mOSr6DM5BJsdaiuPteEZzBqeSgbkE,4246
186
186
  redisbench_admin/run/metrics.py,sha256=8EQdcZbCiFB_kIR1WtUQNOPV8y74bZ8Dj51Cv0aR4nk,7556
187
- redisbench_admin/run/modules.py,sha256=9To85oDw2tmUNmTDxOgvKls_46oZRcd2cCt6xNjIWiA,1691
187
+ redisbench_admin/run/modules.py,sha256=ZMV8IKJAzkSqxIk8vDQq-sOYn2fE1Que6w7I9D4P9xQ,4773
188
188
  redisbench_admin/run/redis_benchmark/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
189
189
  redisbench_admin/run/redis_benchmark/redis_benchmark.py,sha256=e-Az2uTlt3z2W4uzlUsdxeT8GITpxpGb-Mjb6JxrSWc,6848
190
190
  redisbench_admin/run/redisgraph_benchmark_go/__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,7 +209,7 @@ 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
@@ -220,23 +220,23 @@ redisbench_admin/run_remote/remote_db.py,sha256=VNsJmJf7803gsCd_lhwCb37V-xd_mC25
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=r7Obzvu_ZE_j1uUc1HdVbYBIHHgZBHqt9ApaEUXDw3w,33356
223
+ redisbench_admin/run_remote/run_remote.py,sha256=c5utaihKGY42nBTPFraIkW0yYRDHzf1LxsBgCJfNJP4,77264
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=ewjSUX8xsQYolzVPXfaA7y1PWGWL7emwG4W9jspn14Y,43547
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.47.dist-info/LICENSE,sha256=AAMtfs82zOOvmG68vILivm6lxi2rcOlGObmA8jzxQvw,10768
239
- redisbench_admin-0.11.47.dist-info/METADATA,sha256=HpQhYzoW41Ij4DjeA7TbpYKkCTyw9kFDYon9MSnhMkY,5596
240
- redisbench_admin-0.11.47.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
241
- redisbench_admin-0.11.47.dist-info/entry_points.txt,sha256=UUawXk_AS-PlieKJ1QxPQXGsRLb6OW_F0MtmA1W0KE8,113
242
- redisbench_admin-0.11.47.dist-info/RECORD,,
238
+ redisbench_admin-0.11.49.dist-info/LICENSE,sha256=AAMtfs82zOOvmG68vILivm6lxi2rcOlGObmA8jzxQvw,10768
239
+ redisbench_admin-0.11.49.dist-info/METADATA,sha256=MvW4DsC1oIANjXhnvv5FF6O0HCL_POECirbx8tRDM14,5596
240
+ redisbench_admin-0.11.49.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
241
+ redisbench_admin-0.11.49.dist-info/entry_points.txt,sha256=UUawXk_AS-PlieKJ1QxPQXGsRLb6OW_F0MtmA1W0KE8,113
242
+ redisbench_admin-0.11.49.dist-info/RECORD,,