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

@@ -16,6 +16,9 @@ import os
16
16
  from tqdm import tqdm
17
17
  import argparse
18
18
 
19
+ from io import StringIO
20
+ import sys
21
+
19
22
  from redis_benchmarks_specification.__common__.github import (
20
23
  update_comment_if_needed,
21
24
  create_new_pr_comment,
@@ -583,7 +586,11 @@ def compute_regression_table(
583
586
  )
584
587
  (
585
588
  detected_regressions,
586
- table,
589
+ table_full,
590
+ table_stable,
591
+ table_unstable,
592
+ table_improvements,
593
+ table_regressions,
587
594
  total_improvements,
588
595
  total_regressions,
589
596
  total_stable,
@@ -619,13 +626,60 @@ def compute_regression_table(
619
626
  baseline_str, comparison_str
620
627
  )
621
628
  )
622
- writer = MarkdownTableWriter(
623
- table_name="Comparison between {} and {}.\n\nTime Period from {}. (environment used: {})\n".format(
624
- baseline_str,
625
- comparison_str,
626
- from_human_str,
627
- baseline_deployment_name,
628
- ),
629
+
630
+ table_output = "# Comparison between {} and {}.\n\nTime Period from {}. (environment used: {})\n\n".format(
631
+ baseline_str,
632
+ comparison_str,
633
+ from_human_str,
634
+ baseline_deployment_name,
635
+ )
636
+
637
+ if total_regressions > 0:
638
+ old_stdout = sys.stdout
639
+ sys.stdout = mystdout = StringIO()
640
+ table_output += "#### Regressions Table\n\n"
641
+ writer_regressions = MarkdownTableWriter(
642
+ table_name="",
643
+ headers=[
644
+ "Test Case",
645
+ "Baseline {} (median obs. +- std.dev)".format(baseline_str),
646
+ "Comparison {} (median obs. +- std.dev)".format(comparison_str),
647
+ "% change ({})".format(metric_mode),
648
+ "Note",
649
+ ],
650
+ value_matrix=table_regressions,
651
+ )
652
+ writer_regressions.dump(mystdout, False)
653
+ table_output += mystdout.getvalue()
654
+ table_output += "\n\n"
655
+ mystdout.close()
656
+ sys.stdout = old_stdout
657
+
658
+ if total_improvements > 0:
659
+ old_stdout = sys.stdout
660
+ sys.stdout = mystdout = StringIO()
661
+ table_output += "#### Improvements Table\n\n"
662
+ writer_regressions = MarkdownTableWriter(
663
+ table_name="",
664
+ headers=[
665
+ "Test Case",
666
+ "Baseline {} (median obs. +- std.dev)".format(baseline_str),
667
+ "Comparison {} (median obs. +- std.dev)".format(comparison_str),
668
+ "% change ({})".format(metric_mode),
669
+ "Note",
670
+ ],
671
+ value_matrix=table_improvements,
672
+ )
673
+ writer_regressions.dump(mystdout, False)
674
+ table_output += mystdout.getvalue()
675
+ table_output += "\n\n"
676
+ mystdout.close()
677
+ sys.stdout = old_stdout
678
+
679
+ old_stdout = sys.stdout
680
+ sys.stdout = mystdout = StringIO()
681
+ writer_full = MarkdownTableWriter(
682
+ table_name="",
629
683
  headers=[
630
684
  "Test Case",
631
685
  "Baseline {} (median obs. +- std.dev)".format(baseline_str),
@@ -633,21 +687,15 @@ def compute_regression_table(
633
687
  "% change ({})".format(metric_mode),
634
688
  "Note",
635
689
  ],
636
- value_matrix=table,
690
+ value_matrix=table_full,
637
691
  )
638
- table_output = ""
639
-
640
- from io import StringIO
641
- import sys
642
-
643
- old_stdout = sys.stdout
644
- sys.stdout = mystdout = StringIO()
692
+ table_output += "<details>\n <summary>Full Results table:</summary>\n\n"
645
693
 
646
- writer.dump(mystdout, False)
694
+ writer_full.dump(mystdout, False)
647
695
 
648
696
  sys.stdout = old_stdout
649
-
650
- table_output = mystdout.getvalue()
697
+ table_output += mystdout.getvalue()
698
+ table_output += "\n</details>\n"
651
699
 
652
700
  return (
653
701
  detected_regressions,
@@ -742,7 +790,11 @@ def from_rts_to_regression_table(
742
790
  running_platform=None,
743
791
  ):
744
792
  print_all = print_regressions_only is False and print_improvements_only is False
745
- table = []
793
+ table_full = []
794
+ table_unstable = []
795
+ table_stable = []
796
+ table_regressions = []
797
+ table_improvements = []
746
798
  detected_regressions = []
747
799
  total_improvements = 0
748
800
  total_stable = 0
@@ -752,6 +804,10 @@ def from_rts_to_regression_table(
752
804
  noise_waterline = 3
753
805
  progress = tqdm(unit="benchmark time-series", total=len(test_names))
754
806
  for test_name in test_names:
807
+ compare_version = "v0.1.208"
808
+ github_link = "https://github.com/redis/redis-benchmarks-specification/blob"
809
+ test_path = f"redis_benchmarks_specification/test-suites/{test_name}.yml"
810
+ test_link = f"[{test_name}]({github_link}/{compare_version}/{test_path})"
755
811
  multi_value_baseline = check_multi_value_filter(baseline_str)
756
812
  multi_value_comparison = check_multi_value_filter(comparison_str)
757
813
 
@@ -940,6 +996,25 @@ def from_rts_to_regression_table(
940
996
  total_unstable += 1
941
997
 
942
998
  should_add_line = False
999
+ line = get_line(
1000
+ baseline_v_str,
1001
+ comparison_v_str,
1002
+ note,
1003
+ percentage_change,
1004
+ test_link,
1005
+ )
1006
+ if detected_regression:
1007
+ table_regressions.append(line)
1008
+
1009
+ if detected_improvement:
1010
+ table_improvements.append(line)
1011
+
1012
+ if unstable:
1013
+ table_unstable.append(line)
1014
+ else:
1015
+ if not detected_regression and not detected_improvement:
1016
+ table_stable.append(line)
1017
+
943
1018
  if print_regressions_only and detected_regression:
944
1019
  should_add_line = True
945
1020
  if print_improvements_only and detected_improvement:
@@ -951,17 +1026,14 @@ def from_rts_to_regression_table(
951
1026
 
952
1027
  if should_add_line:
953
1028
  total_comparison_points = total_comparison_points + 1
954
- add_line(
955
- baseline_v_str,
956
- comparison_v_str,
957
- note,
958
- percentage_change,
959
- table,
960
- test_name,
961
- )
1029
+ table_full.append(line)
962
1030
  return (
963
1031
  detected_regressions,
964
- table,
1032
+ table_full,
1033
+ table_stable,
1034
+ table_unstable,
1035
+ table_improvements,
1036
+ table_regressions,
965
1037
  total_improvements,
966
1038
  total_regressions,
967
1039
  total_stable,
@@ -1037,6 +1109,23 @@ def get_test_names_from_db(rts, tags_regex_string, test_names, used_key):
1037
1109
  return test_names
1038
1110
 
1039
1111
 
1112
+ def get_line(
1113
+ baseline_v_str,
1114
+ comparison_v_str,
1115
+ note,
1116
+ percentage_change,
1117
+ test_name,
1118
+ ):
1119
+ percentage_change_str = "{:.1f}% ".format(percentage_change)
1120
+ return [
1121
+ test_name,
1122
+ baseline_v_str,
1123
+ comparison_v_str,
1124
+ percentage_change_str,
1125
+ note.strip(),
1126
+ ]
1127
+
1128
+
1040
1129
  def add_line(
1041
1130
  baseline_v_str,
1042
1131
  comparison_v_str,
@@ -1045,15 +1134,14 @@ def add_line(
1045
1134
  table,
1046
1135
  test_name,
1047
1136
  ):
1048
- percentage_change_str = "{:.1f}% ".format(percentage_change)
1049
1137
  table.append(
1050
- [
1051
- test_name,
1138
+ get_line(
1052
1139
  baseline_v_str,
1053
1140
  comparison_v_str,
1054
- percentage_change_str,
1055
- note.strip(),
1056
- ]
1141
+ note,
1142
+ percentage_change,
1143
+ test_name,
1144
+ )
1057
1145
  )
1058
1146
 
1059
1147
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: redis-benchmarks-specification
3
- Version: 0.1.208
3
+ Version: 0.1.209
4
4
  Summary: The Redis benchmarks specification describes the cross-language/tools requirements and expectations to foster performance and observability standards around redis related technologies. Members from both industry and academia, including organizations and individuals are encouraged to contribute.
5
5
  Author: filipecosta90
6
6
  Author-email: filipecosta.90@gmail.com
@@ -19,7 +19,7 @@ redis_benchmarks_specification/__common__/runner.py,sha256=6x1L8UAo-gmxLMcsUU4FG
19
19
  redis_benchmarks_specification/__common__/spec.py,sha256=3hvfAb7RuAsqB_PNEo_-iuOtgz1ZCWe3ouMwS5Mw54A,1002
20
20
  redis_benchmarks_specification/__compare__/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
21
21
  redis_benchmarks_specification/__compare__/args.py,sha256=71-pYjlbTQNAXQMbAiet898yhWRIplBBNU5USQqFar4,5341
22
- redis_benchmarks_specification/__compare__/compare.py,sha256=KRbyBcExiGcCgAGJiVh1QZl3K6EsMJOaz7BzVSK5D8Q,36895
22
+ redis_benchmarks_specification/__compare__/compare.py,sha256=kOlVbTbsauVw6_rvG-Mo5M2MrozJF7tnkFvstWXJfp4,39768
23
23
  redis_benchmarks_specification/__init__.py,sha256=YQIEx2sLPPA0JR9OuCuMNMNtm-f_gqDKgzvNJnkGNKY,491
24
24
  redis_benchmarks_specification/__runner__/__init__.py,sha256=l-G1z-t6twUgi8QLueqoTQLvJmv3hJoEYskGm6H7L6M,83
25
25
  redis_benchmarks_specification/__runner__/args.py,sha256=lYvbPd_3ppHZv4f2sRwXcF-fcBrwRSn3H2RMmNVkojY,7221
@@ -150,8 +150,8 @@ redis_benchmarks_specification/test-suites/memtier_benchmark-2keys-set-10-100-el
150
150
  redis_benchmarks_specification/test-suites/memtier_benchmark-2keys-stream-5-entries-xread-all-entries-pipeline-10.yml,sha256=RSkNgV5SsjdkXhM0mifi2GlwIxtiHR8N3u-ieI23BoQ,1126
151
151
  redis_benchmarks_specification/test-suites/memtier_benchmark-2keys-stream-5-entries-xread-all-entries.yml,sha256=w7-dOIU-eATHXCvJbSeih6Vt54oygtkXKskQdzCll3o,1100
152
152
  redis_benchmarks_specification/test-suites/template.txt,sha256=qrci_94QV9bPUJe0cL8lsUaQmX5Woz-jT-pDF0629AE,423
153
- redis_benchmarks_specification-0.1.208.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
154
- redis_benchmarks_specification-0.1.208.dist-info/METADATA,sha256=_0wz8OpHePTYHWPDi62f7UCpMD4ny-acJL1NXEyJceg,22534
155
- redis_benchmarks_specification-0.1.208.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
156
- redis_benchmarks_specification-0.1.208.dist-info/entry_points.txt,sha256=x5WBXCZsnDRTZxV7SBGmC65L2k-ygdDOxV8vuKN00Nk,715
157
- redis_benchmarks_specification-0.1.208.dist-info/RECORD,,
153
+ redis_benchmarks_specification-0.1.209.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
154
+ redis_benchmarks_specification-0.1.209.dist-info/METADATA,sha256=8rtBDsGn018BkFaVJyKPYm1gVqayaETYsAzEa9UBGCU,22534
155
+ redis_benchmarks_specification-0.1.209.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
156
+ redis_benchmarks_specification-0.1.209.dist-info/entry_points.txt,sha256=x5WBXCZsnDRTZxV7SBGmC65L2k-ygdDOxV8vuKN00Nk,715
157
+ redis_benchmarks_specification-0.1.209.dist-info/RECORD,,