redisbench-admin 0.10.27__py3-none-any.whl → 0.10.28__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.
@@ -709,6 +709,7 @@ def print_results_table_stdout(
709
709
  default_metrics,
710
710
  results_dict,
711
711
  setup_name,
712
+ setup_type,
712
713
  test_name,
713
714
  cpu_usage=None,
714
715
  kv_overall={},
@@ -720,7 +721,9 @@ def print_results_table_stdout(
720
721
  default_metrics,
721
722
  None,
722
723
  )
723
- table_name = "Results for {} test-case on {} topology".format(test_name, setup_name)
724
+ table_name = "Results for {} test-case on {} topology (type={})".format(
725
+ test_name, setup_name, setup_type
726
+ )
724
727
  results_matrix_headers = [
725
728
  "Metric JSON Path",
726
729
  "Metric Value",
@@ -269,8 +269,8 @@ def timeseries_test_sucess_flow(
269
269
  )
270
270
  if push_results_redistimeseries:
271
271
  logging.info(
272
- "Pushing results to RedisTimeSeries. Have {} distinct data-points to insert.".format(
273
- len(timeseries_dict.keys())
272
+ "Pushing results to RedisTimeSeries. Have {} distinct data-points to insert. (deployment_name={}, deployment_type={})".format(
273
+ len(timeseries_dict.keys()), deployment_name, deployment_type
274
274
  )
275
275
  )
276
276
  push_data_to_redistimeseries(rts, timeseries_dict)
@@ -13,6 +13,11 @@ import traceback
13
13
  import redis
14
14
  from redisbench_admin.run.git import git_vars_crosscheck
15
15
 
16
+ from redisbench_admin.utils.remote import (
17
+ get_project_ts_tags,
18
+ push_data_to_redistimeseries,
19
+ )
20
+
16
21
  import redisbench_admin.run.metrics
17
22
  from redisbench_admin.profilers.perf import PERF_CALLGRAPH_MODE
18
23
  from redisbench_admin.profilers.profilers_schema import (
@@ -428,6 +433,7 @@ def run_local_command_logic(args, project_name, project_version):
428
433
  default_metrics,
429
434
  results_dict,
430
435
  setup_name,
436
+ setup_type,
431
437
  test_name,
432
438
  total_shards_cpu_usage,
433
439
  overall_end_time_metrics,
@@ -436,6 +442,21 @@ def run_local_command_logic(args, project_name, project_version):
436
442
  "memory_used_memory_dataset",
437
443
  ],
438
444
  )
445
+ export_redis_metrics(
446
+ artifact_version,
447
+ end_time_ms,
448
+ overall_end_time_metrics,
449
+ rts,
450
+ setup_name,
451
+ setup_type,
452
+ test_name,
453
+ tf_github_branch,
454
+ tf_github_org,
455
+ tf_github_repo,
456
+ tf_triggering_env,
457
+ {"metric-type": "redis-metrics"},
458
+ 0,
459
+ )
439
460
 
440
461
  # check KPIs
441
462
  return_code = results_dict_kpi_check(
@@ -464,6 +485,7 @@ def run_local_command_logic(args, project_name, project_version):
464
485
  github_org_name,
465
486
  github_repo_name,
466
487
  tf_triggering_env,
488
+ metadata_tags,
467
489
  )
468
490
 
469
491
  if setup_details["env"] is None:
@@ -526,3 +548,151 @@ def teardown_local_setup(redis_conns, redis_processes, setup_name):
526
548
  for conn in redis_conns:
527
549
  conn.shutdown(nosave=True)
528
550
  logging.info("Tear-down completed")
551
+
552
+
553
+ def export_redis_metrics(
554
+ artifact_version,
555
+ end_time_ms,
556
+ overall_end_time_metrics,
557
+ rts,
558
+ setup_name,
559
+ setup_type,
560
+ test_name,
561
+ tf_github_branch,
562
+ tf_github_org,
563
+ tf_github_repo,
564
+ tf_triggering_env,
565
+ metadata_dict=None,
566
+ expire_ms=0,
567
+ ):
568
+ datapoint_errors = 0
569
+ datapoint_inserts = 0
570
+ sprefix = (
571
+ "ci.benchmarks.redislabs/"
572
+ + "{triggering_env}/{github_org}/{github_repo}".format(
573
+ triggering_env=tf_triggering_env,
574
+ github_org=tf_github_org,
575
+ github_repo=tf_github_repo,
576
+ )
577
+ )
578
+
579
+ logging.info(
580
+ "Adding a total of {} server side metrics collected at the end of benchmark (deployment_name={}, deployment_type={})".format(
581
+ len(list(overall_end_time_metrics.items())), setup_name, setup_type
582
+ )
583
+ )
584
+ timeseries_dict = {}
585
+ by_variants = {}
586
+ if tf_github_branch is not None and tf_github_branch != "":
587
+ by_variants["by.branch/{}".format(tf_github_branch)] = {
588
+ "branch": tf_github_branch
589
+ }
590
+ if artifact_version is not None and artifact_version != "":
591
+ by_variants["by.version/{}".format(artifact_version)] = {
592
+ "version": artifact_version
593
+ }
594
+ for (
595
+ by_variant,
596
+ variant_labels_dict,
597
+ ) in by_variants.items():
598
+ for (
599
+ metric_name,
600
+ metric_value,
601
+ ) in overall_end_time_metrics.items():
602
+ tsname_metric = "{}/{}/{}/benchmark_end/{}/{}".format(
603
+ sprefix,
604
+ test_name,
605
+ by_variant,
606
+ setup_name,
607
+ metric_name,
608
+ )
609
+
610
+ logging.debug(
611
+ "Adding a redis server side metric collected at the end of benchmark."
612
+ + " metric_name={} metric_value={} time-series name: {}".format(
613
+ metric_name,
614
+ metric_value,
615
+ tsname_metric,
616
+ )
617
+ )
618
+ variant_labels_dict["metric"] = metric_name
619
+ commandstats_latencystats_process_name(
620
+ metric_name, "commandstats_cmdstat_", setup_name, variant_labels_dict
621
+ )
622
+ commandstats_latencystats_process_name(
623
+ metric_name,
624
+ "latencystats_latency_percentiles_usec_",
625
+ setup_name,
626
+ variant_labels_dict,
627
+ )
628
+
629
+ variant_labels_dict["test_name"] = test_name
630
+ if metadata_dict is not None:
631
+ variant_labels_dict.update(metadata_dict)
632
+
633
+ timeseries_dict[tsname_metric] = {
634
+ "labels": get_project_ts_tags(
635
+ tf_github_org,
636
+ tf_github_repo,
637
+ setup_name,
638
+ setup_type,
639
+ tf_triggering_env,
640
+ variant_labels_dict,
641
+ None,
642
+ None,
643
+ ),
644
+ "data": {end_time_ms: metric_value},
645
+ }
646
+ i_errors, i_inserts = push_data_to_redistimeseries(rts, timeseries_dict, expire_ms)
647
+ datapoint_errors = datapoint_errors + i_errors
648
+ datapoint_inserts = datapoint_inserts + i_inserts
649
+ return datapoint_errors, datapoint_inserts
650
+
651
+
652
+ def commandstats_latencystats_process_name(
653
+ metric_name, prefix, setup_name, variant_labels_dict
654
+ ):
655
+ if prefix in metric_name:
656
+ command_and_metric_and_shard = metric_name[len(prefix) :]
657
+ command = (
658
+ command_and_metric_and_shard[0]
659
+ + command_and_metric_and_shard[1:].split("_", 1)[0]
660
+ )
661
+ metric_and_shard = command_and_metric_and_shard[1:].split("_", 1)[1]
662
+ metric = metric_and_shard
663
+ shard = "1"
664
+ if "_shard_" in metric_and_shard:
665
+ metric = metric_and_shard.split("_shard_")[0]
666
+ shard = metric_and_shard.split("_shard_")[1]
667
+ variant_labels_dict["metric"] = metric
668
+ variant_labels_dict["command"] = command
669
+ variant_labels_dict["command_and_metric"] = "{} - {}".format(command, metric)
670
+ variant_labels_dict["command_and_metric_and_setup"] = "{} - {} - {}".format(
671
+ command, metric, setup_name
672
+ )
673
+ variant_labels_dict["command_and_setup"] = "{} - {}".format(command, setup_name)
674
+ variant_labels_dict["shard"] = shard
675
+ variant_labels_dict["metric_and_shard"] = metric_and_shard
676
+
677
+ version = None
678
+ branch = None
679
+ if "version" in variant_labels_dict:
680
+ version = variant_labels_dict["version"]
681
+ if "branch" in variant_labels_dict:
682
+ branch = variant_labels_dict["branch"]
683
+
684
+ if version is not None:
685
+ variant_labels_dict[
686
+ "command_and_metric_and_version"
687
+ ] = "{} - {} - {}".format(command, metric, version)
688
+ variant_labels_dict[
689
+ "command_and_metric_and_setup_and_version"
690
+ ] = "{} - {} - {} - {}".format(command, metric, setup_name, version)
691
+
692
+ if branch is not None:
693
+ variant_labels_dict[
694
+ "command_and_metric_and_branch"
695
+ ] = "{} - {} - {}".format(command, metric, branch)
696
+ variant_labels_dict[
697
+ "command_and_metric_and_setup_and_branch"
698
+ ] = "{} - {} - {} - {}".format(command, metric, setup_name, branch)
@@ -1008,6 +1008,7 @@ def run_remote_command_logic(args, project_name, project_version):
1008
1008
  default_metrics,
1009
1009
  results_dict,
1010
1010
  setup_name,
1011
+ setup_type,
1011
1012
  test_name,
1012
1013
  total_shards_cpu_usage,
1013
1014
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: redisbench-admin
3
- Version: 0.10.27
3
+ Version: 0.10.28
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
@@ -176,7 +176,7 @@ redisbench_admin/run/ann/pkg/test/test-jaccard.py,sha256=oIhaQCQKrQokwv3fvgLSwPl
176
176
  redisbench_admin/run/ann/pkg/test/test-metrics.py,sha256=vJdS8Kuk8bAnpB65Uqb-9rUUI35XrHwaO3cNwKX5gxc,3057
177
177
  redisbench_admin/run/args.py,sha256=Sspv4eusQs9HMVMIyv_hB9vQ3S_s0lHYGAL1gPb2WGM,7864
178
178
  redisbench_admin/run/cluster.py,sha256=QuptSW-IhdyFIoQ3hzY613jtQWxBrVIlgc8OarcEK20,6072
179
- redisbench_admin/run/common.py,sha256=ihuO5lPjvLZ9aSKp1TChnwTlYkc5YJMs-eKe06_pmgc,26002
179
+ redisbench_admin/run/common.py,sha256=NbgPqEWDEe4S4LSEbM6tnjGunrTqCLYcwV-2mVJlY7Y,26054
180
180
  redisbench_admin/run/ftsb/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
181
181
  redisbench_admin/run/ftsb/ftsb.py,sha256=plP-yxjMvvy-gITlXpuXJcyrPHfDoYYI8JRwTe5kK4M,2388
182
182
  redisbench_admin/run/git.py,sha256=6UYGcTN0MPzf4QDVoJnFkou0yZasLF6jLG7f0zoySq8,3064
@@ -189,7 +189,7 @@ redisbench_admin/run/redis_benchmark/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMy
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
191
191
  redisbench_admin/run/redisgraph_benchmark_go/redisgraph_benchmark_go.py,sha256=DijIoWr73e2t7Zy-UmODzC51IjUh6hH5I0LaPRJW4Vk,2241
192
- redisbench_admin/run/redistimeseries.py,sha256=De6mZP6h91ZbThOQsrxDE_p3TQDARpKdvesDMYNJqUY,21256
192
+ redisbench_admin/run/redistimeseries.py,sha256=x3PA7QoHXu53zs5v0ekK2sVmUnA9_ZF2JxgCDf1Mui4,21331
193
193
  redisbench_admin/run/run.py,sha256=Yc8WcRS13EuASVBQAMkj_v8-Uks6HXebMsuPEWT0GVk,3462
194
194
  redisbench_admin/run/s3.py,sha256=pXQXZ1rrwDCWeBegGR4aKzbKqWWwMrmqvIjFxEB3bh4,442
195
195
  redisbench_admin/run/ssh.py,sha256=gRW6ROoTKlaxLKhS5tM-Ejjd6zk2iO1KN9dzBzw7GOk,2835
@@ -209,7 +209,7 @@ redisbench_admin/run_local/args.py,sha256=VkIDvdTW-cRl-ncOkcK8-8MdCbq-qyipGQFugh
209
209
  redisbench_admin/run_local/local_client.py,sha256=gwawMDOBrf7m--uyxu8kMZC5LBiLjbUBSKvzVOdOAas,124
210
210
  redisbench_admin/run_local/local_db.py,sha256=Xh7xyZaSyhmRXKyMsbKqO9aLUikf-EXGha3K1h9yL2M,7396
211
211
  redisbench_admin/run_local/local_helpers.py,sha256=JyqLW2-Sbm35BXjxxfOB1yK7ADdLfcVrq08NLNdIwac,7026
212
- redisbench_admin/run_local/run_local.py,sha256=Kl0yF0VW68a_ydOapxPkSTHD2ET-88YeWsZvUihSH78,24565
212
+ redisbench_admin/run_local/run_local.py,sha256=bbMVm-8d-UFidq1DzQw3I1XOeQItGMIsvvVFm3r-q8c,30937
213
213
  redisbench_admin/run_remote/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
214
214
  redisbench_admin/run_remote/args.py,sha256=vhV87avBwXL8c2QLqrAkIyWD53MYhN06F-3wRv3l5xE,3829
215
215
  redisbench_admin/run_remote/consts.py,sha256=bCMkwyeBD-EmOpoHKni7LjWy5WuaxGJhGhqpi4AL0RQ,386
@@ -220,7 +220,7 @@ redisbench_admin/run_remote/remote_db.py,sha256=a1_fnLhsCGv_0HMBB91zscHTFcHwmab_
220
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
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
223
+ redisbench_admin/run_remote/run_remote.py,sha256=3DD5vHz3CIP7Zk9OFRBlzNFjAo_ua-c-of7paaMxiIo,67436
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
@@ -235,8 +235,8 @@ redisbench_admin/utils/utils.py,sha256=FLDjhGkW0PWwcu_nlTnIW6aZtHzJGz4LIwvu1CpCa
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=jFGtm5ktjKuXKWvH7lnmf3pp-ch1WBJUOomXILJMDAg,6158
238
- redisbench_admin-0.10.27.dist-info/LICENSE,sha256=AAMtfs82zOOvmG68vILivm6lxi2rcOlGObmA8jzxQvw,10768
239
- redisbench_admin-0.10.27.dist-info/entry_points.txt,sha256=UUawXk_AS-PlieKJ1QxPQXGsRLb6OW_F0MtmA1W0KE8,113
240
- redisbench_admin-0.10.27.dist-info/WHEEL,sha256=vVCvjcmxuUltf8cYhJ0sJMRDLr1XsPuxEId8YDzbyCY,88
241
- redisbench_admin-0.10.27.dist-info/METADATA,sha256=cHp1LDMJtxKWUPgJ9H-QKbFJ_wOFrGP3NNT-falBy_k,5336
242
- redisbench_admin-0.10.27.dist-info/RECORD,,
238
+ redisbench_admin-0.10.28.dist-info/LICENSE,sha256=AAMtfs82zOOvmG68vILivm6lxi2rcOlGObmA8jzxQvw,10768
239
+ redisbench_admin-0.10.28.dist-info/entry_points.txt,sha256=UUawXk_AS-PlieKJ1QxPQXGsRLb6OW_F0MtmA1W0KE8,113
240
+ redisbench_admin-0.10.28.dist-info/WHEEL,sha256=vVCvjcmxuUltf8cYhJ0sJMRDLr1XsPuxEId8YDzbyCY,88
241
+ redisbench_admin-0.10.28.dist-info/METADATA,sha256=A7x_oHH4TOD4DCFSppQ0Jmy6G03hnaUfoCsMaW6ZmX4,5336
242
+ redisbench_admin-0.10.28.dist-info/RECORD,,