redisbench-admin 0.10.17__py3-none-any.whl → 0.10.19__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.
@@ -649,7 +649,7 @@ def get_by_strings(
649
649
  baseline_str = baseline_branch
650
650
  if comparison_branch is not None:
651
651
  comparison_covered = True
652
- by_str_baseline = "branch"
652
+ by_str_comparison = "branch"
653
653
  comparison_str = comparison_branch
654
654
 
655
655
  if baseline_tag is not None:
@@ -722,6 +722,7 @@ def from_rts_to_regression_table(
722
722
  total_comparison_points = 0
723
723
  noise_waterline = 3
724
724
  progress = tqdm(unit="benchmark time-series", total=len(test_names))
725
+ at_comparison=0
725
726
  for test_name in test_names:
726
727
  multi_value_baseline = check_multi_value_filter(baseline_str)
727
728
  multi_value_comparison = check_multi_value_filter(comparison_str)
@@ -960,7 +961,12 @@ def check_multi_value_filter(baseline_str):
960
961
 
961
962
 
962
963
  def prepare_value_str(baseline_pct_change, baseline_v, baseline_values, simplify_table):
963
- baseline_v_str = " {:.0f}".format(baseline_v)
964
+ if baseline_v < 1.0:
965
+ baseline_v_str = " {:.2f}".format(baseline_v)
966
+ elif baseline_v < 10.0:
967
+ baseline_v_str = " {:.1f}".format(baseline_v)
968
+ else:
969
+ baseline_v_str = " {:.0f}".format(baseline_v)
964
970
  stamp_b = ""
965
971
  if baseline_pct_change > 10.0:
966
972
  stamp_b = "UNSTABLE "
@@ -31,6 +31,8 @@ def remote_env_setup(
31
31
  tf_override_name=None,
32
32
  tf_folder_path=None,
33
33
  spot_instance_error=False,
34
+ spot_price_counter=0,
35
+ full_price_counter=0,
34
36
  ):
35
37
  server_plaintext_port = args.db_port
36
38
  db_ssh_port = args.db_ssh_port
@@ -85,6 +87,7 @@ def remote_env_setup(
85
87
  tf_folder_spot_path,
86
88
  )
87
89
  spot_available_and_used = True
90
+ spot_price_counter = spot_price_counter + 1
88
91
  except TerraformCommandError as error:
89
92
  spot_instance_error = True
90
93
  logging.error(
@@ -95,7 +98,7 @@ def remote_env_setup(
95
98
  pass
96
99
  else:
97
100
  logging.warning(
98
- f"Even though there is a spot instance config, avoiding deploying it."
101
+ "Even though there is a spot instance config, avoiding deploying it."
99
102
  )
100
103
  if spot_available_and_used is False:
101
104
  (
@@ -121,6 +124,7 @@ def remote_env_setup(
121
124
  tf_override_name,
122
125
  tf_folder_path,
123
126
  )
127
+ full_price_counter = full_price_counter + 1
124
128
  logging.info("Using the following connection addresses.")
125
129
  logging.info(f"client_public_ip={client_public_ip}")
126
130
  logging.info(f"server_public_ip={server_public_ip}")
@@ -134,4 +138,6 @@ def remote_env_setup(
134
138
  client_ssh_port,
135
139
  username,
136
140
  spot_instance_error,
141
+ spot_price_counter,
142
+ full_price_counter,
137
143
  )
@@ -286,8 +286,12 @@ def post_process_remote_run(
286
286
  start_time_str,
287
287
  stdout,
288
288
  )
289
- with open(local_benchmark_output_filename, "r") as json_file:
290
- results_dict = json.load(json_file)
289
+ try:
290
+ with open(local_benchmark_output_filename, "r") as json_file:
291
+ results_dict = json.load(json_file)
292
+ except json.decoder.JSONDecodeError as e:
293
+ logging.error("Received error while decoding JSON: {}".format(e.__str__()))
294
+ pass
291
295
  # check KPIs
292
296
  return_code = results_dict_kpi_check(benchmark_config, results_dict, return_code)
293
297
  # if the benchmark tool is redisgraph-benchmark-go and
@@ -306,6 +306,8 @@ def run_remote_command_logic(args, project_name, project_version):
306
306
 
307
307
  # Used to only deploy spot once per run
308
308
  spot_instance_error = False
309
+ ts_key_spot_price = f"ts:{tf_triggering_env}:tests:spot_price"
310
+ ts_key_full_price = f"ts:{tf_triggering_env}:tests:full_price"
309
311
 
310
312
  for benchmark_type, bench_by_dataset_map in benchmark_runs_plan.items():
311
313
  if return_code != 0 and args.fail_fast:
@@ -418,6 +420,8 @@ def run_remote_command_logic(args, project_name, project_version):
418
420
  client_ssh_port,
419
421
  username,
420
422
  spot_instance_error,
423
+ spot_price_counter,
424
+ full_price_counter,
421
425
  ) = remote_env_setup(
422
426
  args,
423
427
  benchmark_config,
@@ -435,6 +439,8 @@ def run_remote_command_logic(args, project_name, project_version):
435
439
  TF_OVERRIDE_NAME,
436
440
  TF_OVERRIDE_REMOTE,
437
441
  spot_instance_error,
442
+ 0,
443
+ 0,
438
444
  )
439
445
 
440
446
  # after we've created the env, even on error we should always teardown
@@ -442,9 +448,28 @@ def run_remote_command_logic(args, project_name, project_version):
442
448
  try:
443
449
  (
444
450
  _,
445
- _,
451
+ start_time_setup_ms,
446
452
  testcase_start_time_str,
447
453
  ) = get_start_time_vars()
454
+ if args.push_results_redistimeseries:
455
+ logging.info(
456
+ f"Updating overall spot price tests counter {ts_key_spot_price}"
457
+ )
458
+ rts.ts().add(
459
+ ts_key_spot_price,
460
+ start_time_setup_ms,
461
+ spot_price_counter,
462
+ duplicate_policy="sum",
463
+ )
464
+ logging.info(
465
+ f"Updating overall spot price full counter {ts_key_spot_price}"
466
+ )
467
+ rts.ts().add(
468
+ ts_key_full_price,
469
+ start_time_setup_ms,
470
+ full_price_counter,
471
+ duplicate_policy="sum",
472
+ )
448
473
  logname = "{}_{}.log".format(
449
474
  test_name, testcase_start_time_str
450
475
  )
@@ -871,7 +896,9 @@ def run_remote_command_logic(args, project_name, project_version):
871
896
  )
872
897
  return_code |= 1
873
898
  raise Exception(
874
- "Failed to run remote benchmark."
899
+ "Failed to run remote benchmark. {}".format(
900
+ e.__str__()
901
+ )
875
902
  )
876
903
 
877
904
  if setup_details["env"] is None:
@@ -49,6 +49,7 @@ def parse_exporter_timemetric(metric_path: str, results_dict: dict):
49
49
  logging.error(
50
50
  "Unable to parse time-metric {}. Error: {}".format(metric_path, e.__str__())
51
51
  )
52
+ pass
52
53
  return datapoints_timestamp
53
54
 
54
55
 
@@ -578,8 +578,6 @@ def fetch_remote_setup_from_config(
578
578
  setup_type = remote_setup_property["type"]
579
579
  if "setup" in remote_setup_property:
580
580
  setup = remote_setup_property["setup"]
581
- if "spot_instance" in remote_setup_property:
582
- spot_path = "/terraform/" + remote_setup_property["spot_instance"]
583
581
  # fetch terraform folder
584
582
  path = "/terraform/{}-{}".format(setup_type, setup)
585
583
  terraform_working_dir = common_tf(branch, path, repo)
@@ -45,13 +45,14 @@ def get_ci_ec2_instances_by_state(ec2_client, ci_machines_prefix, requested_stat
45
45
  def get_vname_timeout_secs(instance):
46
46
  vm_name = ""
47
47
  timeout_secs = None
48
- for tag_dict in instance["Tags"]:
49
- key = tag_dict["Key"]
50
- key_v = tag_dict["Value"]
51
- if key == "Name":
52
- vm_name = key_v
53
- if key == "timeout_secs":
54
- timeout_secs = int(key_v)
48
+ if "Tags" in instance:
49
+ for tag_dict in instance["Tags"]:
50
+ key = tag_dict["Key"]
51
+ key_v = tag_dict["Value"]
52
+ if key == "Name":
53
+ vm_name = key_v
54
+ if key == "timeout_secs":
55
+ timeout_secs = int(key_v)
55
56
  return vm_name, timeout_secs
56
57
 
57
58
 
@@ -94,7 +95,8 @@ def termination_check(
94
95
  total_instances,
95
96
  vm_name,
96
97
  ):
97
- if ci_machines_prefix in vm_name:
98
+ # terminates also VMs without name set
99
+ if ci_machines_prefix in vm_name or vm_name == "":
98
100
  total_instances = total_instances + 1
99
101
  elapsed = current_datetime - launch_time
100
102
  will_terminate = False
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: redisbench-admin
3
- Version: 0.10.17
3
+ Version: 0.10.19
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
@@ -4,7 +4,7 @@ redisbench_admin/commands/__init__.py,sha256=mzVrEtqefFdopyzR-W6xx3How95dyZfToGK
4
4
  redisbench_admin/commands/commands.json.py,sha256=mzVrEtqefFdopyzR-W6xx3How95dyZfToGKm1-_YzeY,95
5
5
  redisbench_admin/compare/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
6
6
  redisbench_admin/compare/args.py,sha256=10zbiT8roeTGnAubvoVFZTbJNbVxuRaRPtCKjxV8iNE,5226
7
- redisbench_admin/compare/compare.py,sha256=P6vUu_GMLBvsMVhcBn0TTIpgi-qUFJMwKy6Uulsryv0,37548
7
+ redisbench_admin/compare/compare.py,sha256=g1OIapQ-En546WwQsKbfD1hCFpgh_2PhR6nCAATfsc0,37745
8
8
  redisbench_admin/deploy/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
9
9
  redisbench_admin/deploy/args.py,sha256=neLUcQqI__HkJItkQg2C293hl5g3yHG40t171r7-E5Y,1732
10
10
  redisbench_admin/deploy/deploy.py,sha256=c1srxDMaUHuyh6wGdgLqzTz3ljZFtGqiumtAmguVyuk,3791
@@ -217,26 +217,26 @@ redisbench_admin/run_remote/log.py,sha256=cD7zfXt0VEmy0b7452HvcAxX_9kVj6Vm213yNd
217
217
  redisbench_admin/run_remote/notifications.py,sha256=-W9fLaftEFNfplBl2clHk37jbYxliDbHftQ62khN31k,2157
218
218
  redisbench_admin/run_remote/remote_client.py,sha256=JqxsUjyxRtsChIkOWrVTGF_mQH0_8h7v5j-5rud448Y,14079
219
219
  redisbench_admin/run_remote/remote_db.py,sha256=a1_fnLhsCGv_0HMBB91zscHTFcHwmab_u1W7u-u1r3E,12929
220
- redisbench_admin/run_remote/remote_env.py,sha256=HDhriHm_4LSuZLTM-0cIUBddaGEA_qKL7RMFywpUcQs,4378
220
+ redisbench_admin/run_remote/remote_env.py,sha256=fTZliXW7Cz0ztew7IR2BNlqLd_l4_p-5Oc6rX7T5EdI,4605
221
221
  redisbench_admin/run_remote/remote_failures.py,sha256=IOo6DyxarcwwMPCeN4gWB2JrhuC9iBLwq0nCROqr5ak,1567
222
- redisbench_admin/run_remote/remote_helpers.py,sha256=sLlXV-W7qP-8-S9MuDm5UIOEZCePOFnhtNlhe6N7Qtg,9658
223
- redisbench_admin/run_remote/run_remote.py,sha256=yjuWdowqAIAllLVD64jVZGjzXdZPRcv6tARSenq55Pg,65710
222
+ redisbench_admin/run_remote/remote_helpers.py,sha256=gy10SuKheBiL568ldiOdJaHRPJ_J7DxH_uZpqgOuylo,9818
223
+ redisbench_admin/run_remote/run_remote.py,sha256=OYD8vDpfy_v6x7149_RzGetBmqVI6dRzWirpo2x88wo,67380
224
224
  redisbench_admin/run_remote/standalone.py,sha256=vWmm0CdFtrasy-_1BDKO7I_gVPBjjiypv94_Fq2Sm7o,6660
225
225
  redisbench_admin/run_remote/terraform.py,sha256=zD2gGuOmnTex6Dt2lhdAtNn21iL6sykPPXI10jJaim4,3945
226
226
  redisbench_admin/utils/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
227
- redisbench_admin/utils/benchmark_config.py,sha256=Bjh2PbMiUQZ70hwqsP4WhRbkV3S4iETN0rQO3OvINQw,21278
227
+ redisbench_admin/utils/benchmark_config.py,sha256=bvhqKFENdDXpSZvF41EDUwMMhJJ4WQf7DS2BHn8hOz0,21291
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=pnHJIdYYY-y_9iqRsCCe75FXn4CCNahXLnFhS5MT35s,37966
231
+ redisbench_admin/utils/remote.py,sha256=wmDuI0hTe1ntsE9kSn80bhVavPrTxODL1ENhoWRyeJ4,37826
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=FLDjhGkW0PWwcu_nlTnIW6aZtHzJGz4LIwvu1CpCajw,14160
235
235
  redisbench_admin/watchdog/__init__.py,sha256=cD7zfXt0VEmy0b7452HvcAxX_9kVj6Vm213yNdUHP20,95
236
236
  redisbench_admin/watchdog/args.py,sha256=nKsG1G6ATOZlAMHMtT9u3kXxduKCbejSZ5x8oB_ynZ8,1312
237
- redisbench_admin/watchdog/watchdog.py,sha256=vN6zs8z9rdKtQAh0O4iN-vOuQtgfrjZKh4wDqnyPCvk,6043
238
- redisbench_admin-0.10.17.dist-info/LICENSE,sha256=AAMtfs82zOOvmG68vILivm6lxi2rcOlGObmA8jzxQvw,10768
239
- redisbench_admin-0.10.17.dist-info/entry_points.txt,sha256=UUawXk_AS-PlieKJ1QxPQXGsRLb6OW_F0MtmA1W0KE8,113
240
- redisbench_admin-0.10.17.dist-info/WHEEL,sha256=vVCvjcmxuUltf8cYhJ0sJMRDLr1XsPuxEId8YDzbyCY,88
241
- redisbench_admin-0.10.17.dist-info/METADATA,sha256=q0b0QhxeZVSAFXjU1-ISjvoJqrpa3LriYT7w51-YIlc,5336
242
- redisbench_admin-0.10.17.dist-info/RECORD,,
237
+ redisbench_admin/watchdog/watchdog.py,sha256=jFGtm5ktjKuXKWvH7lnmf3pp-ch1WBJUOomXILJMDAg,6158
238
+ redisbench_admin-0.10.19.dist-info/LICENSE,sha256=AAMtfs82zOOvmG68vILivm6lxi2rcOlGObmA8jzxQvw,10768
239
+ redisbench_admin-0.10.19.dist-info/entry_points.txt,sha256=UUawXk_AS-PlieKJ1QxPQXGsRLb6OW_F0MtmA1W0KE8,113
240
+ redisbench_admin-0.10.19.dist-info/WHEEL,sha256=vVCvjcmxuUltf8cYhJ0sJMRDLr1XsPuxEId8YDzbyCY,88
241
+ redisbench_admin-0.10.19.dist-info/METADATA,sha256=DSCii5-Q85r5PJ5Pg3x2vT32LKG3e0MA4aglBkDmD5A,5336
242
+ redisbench_admin-0.10.19.dist-info/RECORD,,