redis-benchmarks-specification 0.1.70__py3-none-any.whl → 0.1.73__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.

Potentially problematic release.


This version of redis-benchmarks-specification might be problematic. Click here for more details.

Files changed (55) hide show
  1. redis_benchmarks_specification/__builder__/builder.py +2 -0
  2. redis_benchmarks_specification/__cli__/args.py +6 -0
  3. redis_benchmarks_specification/__cli__/cli.py +5 -1
  4. redis_benchmarks_specification/__compare__/__init__.py +5 -0
  5. redis_benchmarks_specification/__compare__/args.py +139 -0
  6. redis_benchmarks_specification/__compare__/compare.py +1153 -0
  7. redis_benchmarks_specification/__runner__/runner.py +120 -59
  8. redis_benchmarks_specification/__self_contained_coordinator__/args.py +3 -0
  9. redis_benchmarks_specification/__self_contained_coordinator__/build_info.py +7 -0
  10. redis_benchmarks_specification/__self_contained_coordinator__/runners.py +1 -0
  11. redis_benchmarks_specification/__self_contained_coordinator__/self_contained_coordinator.py +472 -418
  12. redis_benchmarks_specification/test-suites/create-re-string.py +286 -0
  13. redis_benchmarks_specification/test-suites/generate.py +108 -0
  14. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-hash-hexists.yml +1 -1
  15. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-hash-hincrby.yml +2 -2
  16. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-200KiB-values.yml +37 -0
  17. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-20KiB-values.yml +37 -0
  18. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-2MB-values.yml +37 -0
  19. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-decr.yml +33 -0
  20. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-200KiB.yml +33 -0
  21. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-20KiB.yml +33 -0
  22. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-2MB.yml +33 -0
  23. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-100-elements-zrangebyscore-all-elements-long-scores.yml +2 -2
  24. redis_benchmarks_specification/test-suites/my-new-test.yml +16 -0
  25. redis_benchmarks_specification/test-suites/string/memtier_benchmark-100Kkeys-load-string200c-with-20KiB-values-pipeline-10.yml +20 -0
  26. redis_benchmarks_specification/test-suites/string/memtier_benchmark-100Kkeys-load-string200c-with-20KiB-values.yml +20 -0
  27. redis_benchmarks_specification/test-suites/string/memtier_benchmark-100Kkeys-load-string50c-with-20KiB-values-pipeline-10.yml +20 -0
  28. redis_benchmarks_specification/test-suites/string/memtier_benchmark-100Kkeys-load-string50c-with-20KiB-values.yml +20 -0
  29. redis_benchmarks_specification/test-suites/string/memtier_benchmark-100Kkeys-string-setget200c-20KiB-pipeline-10.yml +26 -0
  30. redis_benchmarks_specification/test-suites/string/memtier_benchmark-100Kkeys-string-setget200c-20KiB.yml +26 -0
  31. redis_benchmarks_specification/test-suites/string/memtier_benchmark-100Kkeys-string-setget50c-20KiB-pipeline-10.yml +26 -0
  32. redis_benchmarks_specification/test-suites/string/memtier_benchmark-100Kkeys-string-setget50c-20KiB.yml +26 -0
  33. redis_benchmarks_specification/test-suites/string/memtier_benchmark-1Mkeys-load-string200c-with-100B-values-pipeline-10.yml +20 -0
  34. redis_benchmarks_specification/test-suites/string/memtier_benchmark-1Mkeys-load-string200c-with-100B-values.yml +20 -0
  35. redis_benchmarks_specification/test-suites/string/memtier_benchmark-1Mkeys-load-string200c-with-1KiB-values-pipeline-10.yml +20 -0
  36. redis_benchmarks_specification/test-suites/string/memtier_benchmark-1Mkeys-load-string200c-with-1KiB-values.yml +20 -0
  37. redis_benchmarks_specification/test-suites/string/memtier_benchmark-1Mkeys-load-string50c-with-100B-values-pipeline-10.yml +20 -0
  38. redis_benchmarks_specification/test-suites/string/memtier_benchmark-1Mkeys-load-string50c-with-100B-values.yml +20 -0
  39. redis_benchmarks_specification/test-suites/string/memtier_benchmark-1Mkeys-load-string50c-with-1KiB-values-pipeline-10.yml +20 -0
  40. redis_benchmarks_specification/test-suites/string/memtier_benchmark-1Mkeys-load-string50c-with-1KiB-values.yml +20 -0
  41. redis_benchmarks_specification/test-suites/string/memtier_benchmark-1Mkeys-string-mget-1KiB.yml +27 -0
  42. redis_benchmarks_specification/test-suites/string/memtier_benchmark-1Mkeys-string-setget200c-100B-pipeline-10.yml +26 -0
  43. redis_benchmarks_specification/test-suites/string/memtier_benchmark-1Mkeys-string-setget200c-100B.yml +26 -0
  44. redis_benchmarks_specification/test-suites/string/memtier_benchmark-1Mkeys-string-setget200c-1KiB-pipeline-10.yml +26 -0
  45. redis_benchmarks_specification/test-suites/string/memtier_benchmark-1Mkeys-string-setget200c-1KiB.yml +26 -0
  46. redis_benchmarks_specification/test-suites/string/memtier_benchmark-1Mkeys-string-setget50c-100B-pipeline-10.yml +26 -0
  47. redis_benchmarks_specification/test-suites/string/memtier_benchmark-1Mkeys-string-setget50c-100B.yml +26 -0
  48. redis_benchmarks_specification/test-suites/string/memtier_benchmark-1Mkeys-string-setget50c-1KiB-pipeline-10.yml +26 -0
  49. redis_benchmarks_specification/test-suites/string/memtier_benchmark-1Mkeys-string-setget50c-1KiB.yml +26 -0
  50. redis_benchmarks_specification/test-suites/template.txt +16 -0
  51. {redis_benchmarks_specification-0.1.70.dist-info → redis_benchmarks_specification-0.1.73.dist-info}/METADATA +3 -4
  52. {redis_benchmarks_specification-0.1.70.dist-info → redis_benchmarks_specification-0.1.73.dist-info}/RECORD +55 -16
  53. {redis_benchmarks_specification-0.1.70.dist-info → redis_benchmarks_specification-0.1.73.dist-info}/WHEEL +1 -1
  54. {redis_benchmarks_specification-0.1.70.dist-info → redis_benchmarks_specification-0.1.73.dist-info}/entry_points.txt +1 -0
  55. {redis_benchmarks_specification-0.1.70.dist-info → redis_benchmarks_specification-0.1.73.dist-info}/LICENSE +0 -0
@@ -358,7 +358,21 @@ def process_self_contained_coordinator_stream(
358
358
  preserve_temporary_client_dirs=False,
359
359
  resp_version=None,
360
360
  override_memtier_test_time=0,
361
+ used_memory_check_fail=False,
361
362
  ):
363
+ def delete_temporary_files(
364
+ temporary_dir_client, full_result_path, benchmark_tool_global
365
+ ):
366
+ if preserve_temporary_client_dirs is True:
367
+ logging.info(f"Preserving temporary client dir {temporary_dir_client}")
368
+ else:
369
+ if "redis-benchmark" in benchmark_tool_global:
370
+ if full_result_path is not None:
371
+ os.remove(full_result_path)
372
+ logging.info("Removing temporary JSON file")
373
+ shutil.rmtree(temporary_dir_client, ignore_errors=True)
374
+ logging.info(f"Removing temporary client dir {temporary_dir_client}")
375
+
362
376
  overall_result = True
363
377
  results_matrix = []
364
378
  total_test_suite_runs = 0
@@ -507,6 +521,11 @@ def process_self_contained_coordinator_stream(
507
521
  test_name, maxmemory, benchmark_required_memory
508
522
  )
509
523
  )
524
+ delete_temporary_files(
525
+ temporary_dir_client=temporary_dir_client,
526
+ full_result_path=None,
527
+ benchmark_tool_global=benchmark_tool_global,
528
+ )
510
529
  continue
511
530
 
512
531
  reset_commandstats(redis_conns)
@@ -543,6 +562,11 @@ def process_self_contained_coordinator_stream(
543
562
  test_name, priority_upper_limit, priority
544
563
  )
545
564
  )
565
+ delete_temporary_files(
566
+ temporary_dir_client=temporary_dir_client,
567
+ full_result_path=None,
568
+ benchmark_tool_global=benchmark_tool_global,
569
+ )
546
570
  continue
547
571
  if priority < priority_lower_limit:
548
572
  logging.warning(
@@ -550,6 +574,11 @@ def process_self_contained_coordinator_stream(
550
574
  test_name, priority_lower_limit, priority
551
575
  )
552
576
  )
577
+ delete_temporary_files(
578
+ temporary_dir_client=temporary_dir_client,
579
+ full_result_path=None,
580
+ benchmark_tool_global=benchmark_tool_global,
581
+ )
553
582
  continue
554
583
  logging.info(
555
584
  "Test {} priority ({}) is within the priority limit [{},{}]".format(
@@ -559,46 +588,61 @@ def process_self_contained_coordinator_stream(
559
588
  priority_upper_limit,
560
589
  )
561
590
  )
562
-
563
- if "dataset" in benchmark_config["dbconfig"]:
564
- if args.run_tests_with_dataset is False:
565
- logging.warning(
566
- "Skipping test {} giving it implies dataset preload".format(
567
- test_name
591
+ if "dbconfig" in benchmark_config:
592
+ if "dataset" in benchmark_config["dbconfig"]:
593
+ if args.run_tests_with_dataset is False:
594
+ logging.warning(
595
+ "Skipping test {} giving it implies dataset preload".format(
596
+ test_name
597
+ )
568
598
  )
569
- )
570
- continue
599
+ delete_temporary_files(
600
+ temporary_dir_client=temporary_dir_client,
601
+ full_result_path=None,
602
+ benchmark_tool_global=benchmark_tool_global,
603
+ )
604
+ continue
571
605
 
572
606
  if dry_run is True:
573
607
  dry_run_count = dry_run_count + 1
574
- continue
575
-
576
- if "preload_tool" in benchmark_config["dbconfig"]:
577
- res = data_prepopulation_step(
578
- benchmark_config,
579
- benchmark_tool_workdir,
580
- client_cpuset_cpus,
581
- docker_client,
582
- git_hash,
583
- port,
584
- temporary_dir_client,
585
- test_name,
586
- host,
587
- tls_enabled,
588
- tls_skip_verify,
589
- test_tls_cert,
590
- test_tls_key,
591
- test_tls_cacert,
592
- resp_version,
593
- args.benchmark_local_install,
594
- password,
595
- oss_cluster_api_enabled,
608
+ delete_temporary_files(
609
+ temporary_dir_client=temporary_dir_client,
610
+ full_result_path=None,
611
+ benchmark_tool_global=benchmark_tool_global,
596
612
  )
597
- if res is False:
598
- logging.warning(
599
- "Skipping this test given preload result was false"
613
+ continue
614
+ if "dbconfig" in benchmark_config:
615
+ if "preload_tool" in benchmark_config["dbconfig"]:
616
+ res = data_prepopulation_step(
617
+ benchmark_config,
618
+ benchmark_tool_workdir,
619
+ client_cpuset_cpus,
620
+ docker_client,
621
+ git_hash,
622
+ port,
623
+ temporary_dir_client,
624
+ test_name,
625
+ host,
626
+ tls_enabled,
627
+ tls_skip_verify,
628
+ test_tls_cert,
629
+ test_tls_key,
630
+ test_tls_cacert,
631
+ resp_version,
632
+ args.benchmark_local_install,
633
+ password,
634
+ oss_cluster_api_enabled,
600
635
  )
601
- continue
636
+ if res is False:
637
+ logging.warning(
638
+ "Skipping this test given preload result was false"
639
+ )
640
+ delete_temporary_files(
641
+ temporary_dir_client=temporary_dir_client,
642
+ full_result_path=None,
643
+ benchmark_tool_global=benchmark_tool_global,
644
+ )
645
+ continue
602
646
  execute_init_commands(
603
647
  benchmark_config, r, dbconfig_keyname="dbconfig"
604
648
  )
@@ -608,6 +652,7 @@ def process_self_contained_coordinator_stream(
608
652
  benchmark_required_memory,
609
653
  redis_conns,
610
654
  "start of benchmark",
655
+ used_memory_check_fail,
611
656
  )
612
657
 
613
658
  logging.info("Checking if there is a keyspace check being enforced")
@@ -618,6 +663,11 @@ def process_self_contained_coordinator_stream(
618
663
 
619
664
  if dry_run_include_preload is True:
620
665
  dry_run_count = dry_run_count + 1
666
+ delete_temporary_files(
667
+ temporary_dir_client=temporary_dir_client,
668
+ full_result_path=None,
669
+ benchmark_tool_global=benchmark_tool_global,
670
+ )
621
671
  continue
622
672
 
623
673
  benchmark_tool = extract_client_tool(benchmark_config)
@@ -692,6 +742,11 @@ def process_self_contained_coordinator_stream(
692
742
  logging.warning(
693
743
  "Forcing skip this test given there is an arbitrary commmand and memtier usage. Check https://github.com/RedisLabs/memtier_benchmark/pull/117 ."
694
744
  )
745
+ delete_temporary_files(
746
+ temporary_dir_client=temporary_dir_client,
747
+ full_result_path=None,
748
+ benchmark_tool_global=benchmark_tool_global,
749
+ )
695
750
  continue
696
751
 
697
752
  client_container_image = extract_client_container_image(
@@ -789,6 +844,7 @@ def process_self_contained_coordinator_stream(
789
844
  benchmark_required_memory,
790
845
  redis_conns,
791
846
  "end of benchmark",
847
+ used_memory_check_fail,
792
848
  )
793
849
 
794
850
  if args.flushall_on_every_test_end:
@@ -899,18 +955,11 @@ def process_self_contained_coordinator_stream(
899
955
  shutil.copy(full_result_path, dest_fpath)
900
956
  overall_result &= test_result
901
957
 
902
- if preserve_temporary_client_dirs is True:
903
- logging.info(
904
- f"Preserving temporary client dir {temporary_dir_client}"
905
- )
906
- else:
907
- if "redis-benchmark" in benchmark_tool_global:
908
- os.remove(full_result_path)
909
- logging.info("Removing temporary JSON file")
910
- shutil.rmtree(temporary_dir_client, ignore_errors=True)
911
- logging.info(
912
- f"Removing temporary client dir {temporary_dir_client}"
913
- )
958
+ delete_temporary_files(
959
+ temporary_dir_client=temporary_dir_client,
960
+ full_result_path=full_result_path,
961
+ benchmark_tool_global=benchmark_tool_global,
962
+ )
914
963
 
915
964
  table_name = "Results for entire test-suite"
916
965
  results_matrix_headers = [
@@ -957,22 +1006,33 @@ def get_maxmemory(r):
957
1006
 
958
1007
  def get_benchmark_required_memory(benchmark_config):
959
1008
  benchmark_required_memory = 0
960
- if "resources" in benchmark_config["dbconfig"]:
961
- resources = benchmark_config["dbconfig"]["resources"]
962
- if "requests" in resources:
963
- resources_requests = benchmark_config["dbconfig"]["resources"]["requests"]
964
- if "memory" in resources_requests:
965
- benchmark_required_memory = resources_requests["memory"]
966
- benchmark_required_memory = int(parse_size(benchmark_required_memory))
967
- logging.info(
968
- "Benchmark required memory: {} Bytes".format(
969
- benchmark_required_memory
1009
+ if "dbconfig" in benchmark_config:
1010
+ if "resources" in benchmark_config["dbconfig"]:
1011
+ resources = benchmark_config["dbconfig"]["resources"]
1012
+ if "requests" in resources:
1013
+ resources_requests = benchmark_config["dbconfig"]["resources"][
1014
+ "requests"
1015
+ ]
1016
+ if "memory" in resources_requests:
1017
+ benchmark_required_memory = resources_requests["memory"]
1018
+ benchmark_required_memory = int(
1019
+ parse_size(benchmark_required_memory)
1020
+ )
1021
+ logging.info(
1022
+ "Benchmark required memory: {} Bytes".format(
1023
+ benchmark_required_memory
1024
+ )
970
1025
  )
971
- )
972
1026
  return benchmark_required_memory
973
1027
 
974
1028
 
975
- def used_memory_check(test_name, benchmark_required_memory, redis_conns, stage):
1029
+ def used_memory_check(
1030
+ test_name,
1031
+ benchmark_required_memory,
1032
+ redis_conns,
1033
+ stage,
1034
+ used_memory_check_fail=False,
1035
+ ):
976
1036
  used_memory = 0
977
1037
  for conn in redis_conns:
978
1038
  used_memory = used_memory + conn.info("memory")["used_memory"]
@@ -984,7 +1044,8 @@ def used_memory_check(test_name, benchmark_required_memory, redis_conns, stage):
984
1044
  test_name, benchmark_required_memory, used_memory_gb
985
1045
  )
986
1046
  )
987
- exit(1)
1047
+ if used_memory_check_fail:
1048
+ exit(1)
988
1049
 
989
1050
 
990
1051
  def cp_to_workdir(benchmark_tool_workdir, srcfile):
@@ -147,4 +147,7 @@ def create_self_contained_coordinator_args(project_name):
147
147
  default="{}/defaults.yml".format(SPECS_PATH_TEST_SUITES),
148
148
  help="specify the defaults file containing spec topologies, common metric extractions,etc...",
149
149
  )
150
+ parser.add_argument(
151
+ "--arch", type=str, default="amd64", help="arch to build artifacts"
152
+ )
150
153
  return parser
@@ -7,6 +7,7 @@ from redis_benchmarks_specification.__common__.builder_schema import (
7
7
 
8
8
 
9
9
  def extract_build_info_from_streamdata(testDetails):
10
+ arch = "amd64"
10
11
  use_git_timestamp = False
11
12
  git_timestamp_ms = None
12
13
  metadata = None
@@ -29,6 +30,11 @@ def extract_build_info_from_streamdata(testDetails):
29
30
  build_artifacts_str = "redis-server"
30
31
  build_image = testDetails[b"build_image"].decode()
31
32
  run_image = build_image
33
+ if b"arch" in testDetails:
34
+ arch = testDetails[b"arch"].decode()
35
+ logging.info("detected arch info {}.".format(arch))
36
+ else:
37
+ logging.info("using default arch info {}.".format(arch))
32
38
  if b"run_image" in testDetails:
33
39
  run_image = testDetails[b"run_image"].decode()
34
40
  logging.info("detected run image info {}.".format(run_image))
@@ -49,4 +55,5 @@ def extract_build_info_from_streamdata(testDetails):
49
55
  run_image,
50
56
  use_git_timestamp,
51
57
  git_timestamp_ms,
58
+ arch,
52
59
  )
@@ -136,6 +136,7 @@ def process_self_contained_coordinator_stream(
136
136
  run_image,
137
137
  use_git_timestamp,
138
138
  git_timestamp_ms,
139
+ _,
139
140
  ) = extract_build_info_from_streamdata(testDetails)
140
141
 
141
142
  overall_result = True