redisbench-admin 0.11.57__py3-none-any.whl → 0.11.58__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.
@@ -44,6 +44,8 @@ def prepare_ftsb_benchmark_command(
44
44
  input_file, "/tmp", None, remote_queries_file, is_remote
45
45
  )
46
46
  command_arr.extend(["--input", input_file])
47
+ elif "max-token-size-mb" in k:
48
+ command_arr.extend(["--max-token-size-mb", str(k["max-token-size-mb"])])
47
49
  else:
48
50
  for kk in k.keys():
49
51
  command_arr.extend(["--{}".format(kk), str(k[kk])])
@@ -35,6 +35,9 @@ def ssh_tunnel_redisconn(
35
35
  ssh_address_or_host=(server_public_ip, ssh_port),
36
36
  ssh_username=username,
37
37
  ssh_pkey=ssh_pkey,
38
+ ssh_config_file=None,
39
+ allow_agent=False,
40
+ host_pkey_directories=[],
38
41
  logger=logging.getLogger(),
39
42
  remote_bind_address=(
40
43
  server_private_ip,
@@ -51,6 +51,50 @@ def benchmark_tools_sanity_check(allowed_tools, benchmark_tool):
51
51
  )
52
52
 
53
53
 
54
+ def ensure_aws_cli_available(client_public_ip, username, private_key, client_ssh_port):
55
+ """Check if AWS CLI is available, install if not"""
56
+ logging.info("Checking if AWS CLI is available on remote client...")
57
+
58
+ # Check if aws command exists
59
+ check_result = execute_remote_commands(
60
+ client_public_ip, username, private_key, ["which aws"], client_ssh_port
61
+ )
62
+
63
+ # Check the result
64
+ if len(check_result) > 0:
65
+ [recv_exit_status, stdout, stderr] = check_result[0]
66
+ if recv_exit_status != 0:
67
+ logging.info("AWS CLI not found, installing...")
68
+
69
+ # Install AWS CLI v2
70
+ install_commands = [
71
+ "curl 'https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip' -o 'awscliv2.zip'",
72
+ "unzip -q awscliv2.zip",
73
+ "sudo ./aws/install",
74
+ "rm -rf awscliv2.zip aws/"
75
+ ]
76
+
77
+ install_result = execute_remote_commands(
78
+ client_public_ip, username, private_key, install_commands, client_ssh_port
79
+ )
80
+
81
+ # Check if installation was successful
82
+ for pos, res_pos in enumerate(install_result):
83
+ [recv_exit_status, stdout, stderr] = res_pos
84
+ if recv_exit_status != 0:
85
+ logging.warning(
86
+ "AWS CLI installation command {} returned exit code {}. stdout: {}. stderr: {}".format(
87
+ pos, recv_exit_status, stdout, stderr
88
+ )
89
+ )
90
+
91
+ logging.info("AWS CLI installation completed")
92
+ else:
93
+ logging.info("AWS CLI is already available")
94
+ else:
95
+ logging.error("Failed to check AWS CLI availability")
96
+
97
+
54
98
  def remote_tool_pre_bench_step(
55
99
  benchmark_config,
56
100
  benchmark_min_tool_version,
@@ -221,12 +265,16 @@ def _setup_remote_benchmark_tool_requirements(
221
265
  ]
222
266
 
223
267
  # detect if queries_file_link is a s3 URI or http one and act accordingly (use aws cli or wget)
224
- if queries_file_link.startswith("s3://"):
225
- commands.append(
226
- "aws s3 cp {} {} --no-sign-request".format(queries_file_link, remote_input_file)
227
- )
268
+ if queries_file_link is not None:
269
+ if queries_file_link.startswith("s3://"):
270
+ ensure_aws_cli_available(client_public_ip, username, private_key, client_ssh_port)
271
+ commands.append(
272
+ "timeout 600 aws s3 cp {} {} --no-sign-request --cli-read-timeout 300".format(queries_file_link, remote_input_file)
273
+ )
274
+ else:
275
+ commands.append("wget {} -q -O {}".format(queries_file_link, remote_input_file))
228
276
  else:
229
- commands.append("wget {} -q -O {}".format(queries_file_link, remote_input_file))
277
+ logging.info("No queries file link provided. Skipping download.")
230
278
  execute_remote_commands(
231
279
  client_public_ip, username, private_key, commands, client_ssh_port
232
280
  )
@@ -195,36 +195,59 @@ def merge_default_and_specific_properties_dict_type(
195
195
  )
196
196
  )
197
197
  else:
198
- usecase_kpi = None
199
- use_case_specific_properties = benchmark_config[propertygroup_keyname]
200
- for default_property in default_properties:
201
- default_rule, default_details = list(default_property.items())[0]
202
- default_condition = list(default_details.values())[0]
203
- comparison_key = "{}{}".format(default_rule, default_condition)
204
- found = False
205
- for usecase_kpi in use_case_specific_properties:
206
- usecase_rule, usecase_details = list(usecase_kpi.items())[0]
207
- usecase_condition = list(usecase_details.values())[0]
208
- usecase_comparison_key = "{}{}".format(usecase_rule, usecase_condition)
209
- if comparison_key == usecase_comparison_key:
210
- found = True
211
- if found:
212
- logging.info(
213
- "Skipping to add default '{}' property ({}) given the file {}"
214
- " had the same specific property ({})".format(
215
- propertygroup_keyname,
216
- default_property,
217
- usecase_filename,
218
- usecase_kpi,
198
+ # Special handling for remote configs
199
+ if propertygroup_keyname == "remote":
200
+ # For remote, merge by adding missing keys from defaults
201
+ use_case_specific_properties = benchmark_config[propertygroup_keyname]
202
+ existing_keys = set()
203
+ for item in use_case_specific_properties:
204
+ existing_keys.update(item.keys())
205
+
206
+ for default_property in default_properties:
207
+ for key in default_property.keys():
208
+ if key not in existing_keys:
209
+ use_case_specific_properties.append(default_property)
210
+ logging.info(
211
+ "Adding a default '{}' property ({}) given the file {} did not have the specific property".format(
212
+ propertygroup_keyname, default_property, usecase_filename
213
+ )
214
+ )
215
+ break
216
+ else:
217
+ # Original logic for kpis and other properties
218
+ usecase_kpi = None
219
+ use_case_specific_properties = benchmark_config[propertygroup_keyname]
220
+ for default_property in default_properties:
221
+ default_rule, default_details = list(default_property.items())[0]
222
+ if isinstance(default_details, dict):
223
+ default_condition = list(default_details.values())[0]
224
+ else:
225
+ default_condition = default_details
226
+ comparison_key = "{}{}".format(default_rule, default_condition)
227
+ found = False
228
+ for usecase_kpi in use_case_specific_properties:
229
+ usecase_rule, usecase_details = list(usecase_kpi.items())[0]
230
+ usecase_condition = list(usecase_details.values())[0]
231
+ usecase_comparison_key = "{}{}".format(usecase_rule, usecase_condition)
232
+ if comparison_key == usecase_comparison_key:
233
+ found = True
234
+ if found:
235
+ logging.info(
236
+ "Skipping to add default '{}' property ({}) given the file {}"
237
+ " had the same specific property ({})".format(
238
+ propertygroup_keyname,
239
+ default_property,
240
+ usecase_filename,
241
+ usecase_kpi,
242
+ )
219
243
  )
220
- )
221
- else:
222
- use_case_specific_properties.append(default_property)
223
- logging.info(
224
- "Adding a default '{}' property ({}) given the file {} did not had the specific property".format(
225
- propertygroup_keyname, default_property, usecase_filename
244
+ else:
245
+ use_case_specific_properties.append(default_property)
246
+ logging.info(
247
+ "Adding a default '{}' property ({}) given the file {} did not have the specific property".format(
248
+ propertygroup_keyname, default_property, usecase_filename
249
+ )
226
250
  )
227
- )
228
251
 
229
252
 
230
253
  def extract_redis_dbconfig_parameters(benchmark_config, dbconfig_keyname):
@@ -70,7 +70,7 @@ def check_dataset_local_requirements(
70
70
  def check_if_needs_remote_fetch(
71
71
  property, localtemp_dir, dirname, full_path=None, is_remote=False
72
72
  ):
73
- if property.startswith("http"):
73
+ if property.startswith("http") or property.startswith("s3"):
74
74
  if not os.path.isdir(localtemp_dir):
75
75
  os.mkdir(localtemp_dir)
76
76
  if full_path is None:
@@ -82,7 +82,10 @@ def check_if_needs_remote_fetch(
82
82
  property, full_path, localtemp_dir
83
83
  )
84
84
  )
85
- wget.download(property, full_path)
85
+ if property.startswith("s3://"):
86
+ logging.error("Unexpected s3 URL. It should have already been downloaded. Skipping...")
87
+ else:
88
+ wget.download(property, full_path)
86
89
  else:
87
90
  logging.info(
88
91
  "Reusing cached remote file (located at {} ).".format(full_path)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: redisbench-admin
3
- Version: 0.11.57
3
+ Version: 0.11.58
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
@@ -53,7 +53,7 @@ redisbench_admin/run/asm.py,sha256=Hybna8Xs7SnsP2IBwg6kMsiGPoCK0TlvhyKX94XmOEs,1
53
53
  redisbench_admin/run/cluster.py,sha256=_Y6a8Dbu1cJ7OxhgymKQSZcCmV8cZ3UpGEWL6b6O84Y,6363
54
54
  redisbench_admin/run/common.py,sha256=1zJPQtIk3tjvLTjNUgxvDdcviN73psiaDBQ8cRJMIl8,29341
55
55
  redisbench_admin/run/ftsb/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
56
- redisbench_admin/run/ftsb/ftsb.py,sha256=MnviWzIxMPxAw__R1lQT6tTsH7nP7t5ejCXrALm2MUw,2580
56
+ redisbench_admin/run/ftsb/ftsb.py,sha256=0SS4InU7e9x-yZ0u-D1yOYJ0u0G37IwVWwiK78LRXE8,2712
57
57
  redisbench_admin/run/git.py,sha256=6UYGcTN0MPzf4QDVoJnFkou0yZasLF6jLG7f0zoySq8,3064
58
58
  redisbench_admin/run/grafana.py,sha256=iMDgMyJKinpZMTD43rZ1IcRGkadjFjCxaB48mYWkvG4,9421
59
59
  redisbench_admin/run/memtier_benchmark/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
@@ -67,7 +67,7 @@ redisbench_admin/run/redisgraph_benchmark_go/redisgraph_benchmark_go.py,sha256=D
67
67
  redisbench_admin/run/redistimeseries.py,sha256=x3PA7QoHXu53zs5v0ekK2sVmUnA9_ZF2JxgCDf1Mui4,21331
68
68
  redisbench_admin/run/run.py,sha256=AwE4_qkejAXOcDVFmwHjVqYjqi1BFZKdGNrCKBHkAHI,6030
69
69
  redisbench_admin/run/s3.py,sha256=pXQXZ1rrwDCWeBegGR4aKzbKqWWwMrmqvIjFxEB3bh4,442
70
- redisbench_admin/run/ssh.py,sha256=gRW6ROoTKlaxLKhS5tM-Ejjd6zk2iO1KN9dzBzw7GOk,2835
70
+ redisbench_admin/run/ssh.py,sha256=WinLylTbLsS8Bgqtiko1IDuD1OqHMU81nVAt8mSwQUI,2926
71
71
  redisbench_admin/run/tsbs_run_queries_redistimeseries/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
72
72
  redisbench_admin/run/tsbs_run_queries_redistimeseries/tsbs_run_queries_redistimeseries.py,sha256=CfXcoLS25pEkhGtka82JwgDZVPV4w2lU_VhI-reH5h4,2514
73
73
  redisbench_admin/run/ycsb/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -94,13 +94,13 @@ redisbench_admin/run_remote/remote_client.py,sha256=rRmDro1weto01wzqYpId8NMPoizE
94
94
  redisbench_admin/run_remote/remote_db.py,sha256=EEDeiOZk-godr5EINscEkOJLGWUN3gFfH6RaBzAKbak,14566
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=OEFjbdqG_FJ5KY6B63jYr21vPomtM3ld_F9MsGRTaCU,11271
97
+ redisbench_admin/run_remote/remote_helpers.py,sha256=6rbENEUs62ZAqXDVgLMfh9o8gttcG0bG0lXE0HNdFeo,13271
98
98
  redisbench_admin/run_remote/run_remote.py,sha256=tZqCu1fTfB5gWooVIEsSDoaVfnVRfxeCpn-RLmYI3IM,75476
99
99
  redisbench_admin/run_remote/standalone.py,sha256=WRgiY8oMJwDUPht1LAPG9tnOLvhJmhRvVOi3GBnMoX4,27952
100
100
  redisbench_admin/run_remote/terraform.py,sha256=vV3eWXNwj7vsnFNqUgCir5ueZS4VYopEyzWiTtoSq0Q,4018
101
101
  redisbench_admin/utils/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
102
- redisbench_admin/utils/benchmark_config.py,sha256=bC2C6rnj89wkkSlOXyyfe0N15unn_M1t1zfskfVkb98,21387
103
- redisbench_admin/utils/local.py,sha256=zUvyVI9LZMT3qyxs1pO3mXL6Bt_1z9EZUGppaRcWNRA,3890
102
+ redisbench_admin/utils/benchmark_config.py,sha256=SREplEGIfPtR9NKIjJXb5pug-ikbJDsDMpZ9UM5sg0M,22676
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
106
  redisbench_admin/utils/remote.py,sha256=MsRL6x-eekzJOVE6Ho05igZzUX54m-4fRVCQlSYxyw0,42306
@@ -110,8 +110,8 @@ redisbench_admin/utils/utils.py,sha256=XVSvo1_DdcYwk2jOxL3VPVPbnDnhGYt8ieYfANo6r
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.57.dist-info/METADATA,sha256=2T9Tvwug0CQlh1ueoikzvMk4sBlqjL2JP9argPeR25A,5724
114
- redisbench_admin-0.11.57.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
115
- redisbench_admin-0.11.57.dist-info/entry_points.txt,sha256=UUawXk_AS-PlieKJ1QxPQXGsRLb6OW_F0MtmA1W0KE8,113
116
- redisbench_admin-0.11.57.dist-info/licenses/LICENSE,sha256=AAMtfs82zOOvmG68vILivm6lxi2rcOlGObmA8jzxQvw,10768
117
- redisbench_admin-0.11.57.dist-info/RECORD,,
113
+ redisbench_admin-0.11.58.dist-info/METADATA,sha256=c-SW0SwVQ3NXU7l69rv4zHC-J9DpCbePfKteRNPVYvU,5724
114
+ redisbench_admin-0.11.58.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
115
+ redisbench_admin-0.11.58.dist-info/entry_points.txt,sha256=UUawXk_AS-PlieKJ1QxPQXGsRLb6OW_F0MtmA1W0KE8,113
116
+ redisbench_admin-0.11.58.dist-info/licenses/LICENSE,sha256=AAMtfs82zOOvmG68vILivm6lxi2rcOlGObmA8jzxQvw,10768
117
+ redisbench_admin-0.11.58.dist-info/RECORD,,