@@ -250,6 +250,10 @@ def compare_command_logic(args, project_name, project_version):
250
250
running_platform = args .running_platform
251
251
baseline_target_version = args .baseline_target_version
252
252
comparison_target_version = args .comparison_target_version
253
+ baseline_github_repo = args .baseline_github_repo
254
+ comparison_github_repo = args .comparison_github_repo
255
+ baseline_hash = args .baseline_hash
256
+ comparison_hash = args .comparison_hash
253
257
254
258
if running_platform is not None :
255
259
logging .info (
@@ -310,6 +314,10 @@ def compare_command_logic(args, project_name, project_version):
310
314
running_platform ,
311
315
baseline_target_version ,
312
316
comparison_target_version ,
317
+ baseline_hash ,
318
+ comparison_hash ,
319
+ baseline_github_repo ,
320
+ comparison_github_repo ,
313
321
)
314
322
prepare_regression_comment (
315
323
auto_approve ,
@@ -535,6 +543,10 @@ def compute_regression_table(
535
543
running_platform = None ,
536
544
baseline_target_version = None ,
537
545
comparison_target_version = None ,
546
+ comparison_hash = None ,
547
+ baseline_hash = None ,
548
+ baseline_github_repo = "redis" ,
549
+ comparison_github_repo = "redis" ,
538
550
):
539
551
START_TIME_NOW_UTC , _ , _ = get_start_time_vars ()
540
552
START_TIME_LAST_MONTH_UTC = START_TIME_NOW_UTC - datetime .timedelta (days = 31 )
@@ -560,6 +572,8 @@ def compute_regression_table(
560
572
comparison_tag ,
561
573
baseline_target_version ,
562
574
comparison_target_version ,
575
+ comparison_hash ,
576
+ baseline_hash ,
563
577
)
564
578
logging .info (f"Using baseline filter { by_str_baseline } ={ baseline_str } " )
565
579
logging .info (f"Using comparison filter { by_str_comparison } ={ comparison_str } " )
@@ -605,6 +619,8 @@ def compute_regression_table(
605
619
total_stable ,
606
620
total_unstable ,
607
621
total_comparison_points ,
622
+ regressions_list ,
623
+ improvements_list ,
608
624
) = from_rts_to_regression_table (
609
625
baseline_deployment_name ,
610
626
comparison_deployment_name ,
@@ -629,6 +645,8 @@ def compute_regression_table(
629
645
tf_triggering_env ,
630
646
verbose ,
631
647
running_platform ,
648
+ baseline_github_repo ,
649
+ comparison_github_repo ,
632
650
)
633
651
logging .info (
634
652
"Printing differential analysis between {} and {}" .format (
@@ -661,6 +679,8 @@ def compute_regression_table(
661
679
writer_regressions .dump (mystdout , False )
662
680
table_output += mystdout .getvalue ()
663
681
table_output += "\n \n "
682
+ test_names_str = "|" .join (regressions_list )
683
+ table_output += f"Regressions test regexp names: { test_names_str } \n \n "
664
684
mystdout .close ()
665
685
sys .stdout = old_stdout
666
686
@@ -682,6 +702,8 @@ def compute_regression_table(
682
702
writer_regressions .dump (mystdout , False )
683
703
table_output += mystdout .getvalue ()
684
704
table_output += "\n \n "
705
+ test_names_str = "|" .join (improvements_list )
706
+ table_output += f"Improvements test regexp names: { test_names_str } \n \n "
685
707
mystdout .close ()
686
708
sys .stdout = old_stdout
687
709
@@ -724,6 +746,8 @@ def get_by_strings(
724
746
comparison_tag ,
725
747
baseline_target_version = None ,
726
748
comparison_target_version = None ,
749
+ baseline_hash = None ,
750
+ comparison_hash = None ,
727
751
):
728
752
baseline_covered = False
729
753
comparison_covered = False
@@ -760,6 +784,16 @@ def get_by_strings(
760
784
by_str_baseline = "target+version"
761
785
baseline_str = baseline_target_version
762
786
787
+ if baseline_hash is not None :
788
+ if comparison_covered :
789
+ logging .error (
790
+ "--baseline-branch, --baseline-tag, --baseline-hash, and --baseline-target-version are mutually exclusive. Pick one..."
791
+ )
792
+ exit (1 )
793
+ baseline_covered = True
794
+ by_str_baseline = "hash"
795
+ baseline_str = baseline_hash
796
+
763
797
if comparison_tag is not None :
764
798
# check if we had already covered comparison
765
799
if comparison_covered :
@@ -781,16 +815,27 @@ def get_by_strings(
781
815
by_str_comparison = "target+version"
782
816
comparison_str = comparison_target_version
783
817
818
+ if comparison_hash is not None :
819
+ # check if we had already covered comparison
820
+ if comparison_covered :
821
+ logging .error (
822
+ "--comparison-branch, --comparison-tag, --comparison-hash, and --comparison-target-table are mutually exclusive. Pick one..."
823
+ )
824
+ exit (1 )
825
+ comparison_covered = True
826
+ by_str_comparison = "hash"
827
+ comparison_str = comparison_hash
828
+
784
829
if baseline_covered is False :
785
830
logging .error (
786
831
"You need to provider either "
787
- + "( --baseline-branch, --baseline-tag, or --baseline-target-version ) "
832
+ + "( --baseline-branch, --baseline-tag, --baseline-hash, or --baseline-target-version ) "
788
833
)
789
834
exit (1 )
790
835
if comparison_covered is False :
791
836
logging .error (
792
837
"You need to provider either "
793
- + "( --comparison-branch, --comparison-tag, or --comparison-target-version ) "
838
+ + "( --comparison-branch, --comparison-tag, --comparison-hash, or --comparison-target-version ) "
794
839
)
795
840
exit (1 )
796
841
return baseline_str , by_str_baseline , comparison_str , by_str_comparison
@@ -820,6 +865,8 @@ def from_rts_to_regression_table(
820
865
tf_triggering_env ,
821
866
verbose ,
822
867
running_platform = None ,
868
+ baseline_github_repo = "redis" ,
869
+ comparison_github_repo = "redis" ,
823
870
):
824
871
print_all = print_regressions_only is False and print_improvements_only is False
825
872
table_full = []
@@ -835,6 +882,8 @@ def from_rts_to_regression_table(
835
882
total_comparison_points = 0
836
883
noise_waterline = 3
837
884
progress = tqdm (unit = "benchmark time-series" , total = len (test_names ))
885
+ regressions_list = []
886
+ improvements_list = []
838
887
for test_name in test_names :
839
888
compare_version = "v0.1.208"
840
889
github_link = "https://github.com/redis/redis-benchmarks-specification/blob"
@@ -848,18 +897,23 @@ def from_rts_to_regression_table(
848
897
"metric={}" .format (metric_name ),
849
898
"{}={}" .format (test_filter , test_name ),
850
899
"deployment_name={}" .format (baseline_deployment_name ),
900
+ "github_repo={}" .format (baseline_github_repo ),
851
901
"triggering_env={}" .format (tf_triggering_env ),
852
902
]
853
903
if running_platform is not None :
854
904
filters_baseline .append ("running_platform={}" .format (running_platform ))
855
905
filters_comparison = [
856
906
"{}={}" .format (by_str_comparison , comparison_str ),
857
907
"metric={}" .format (metric_name ),
858
- "hash==" ,
859
908
"{}={}" .format (test_filter , test_name ),
860
909
"deployment_name={}" .format (comparison_deployment_name ),
910
+ "github_repo={}" .format (comparison_github_repo ),
861
911
"triggering_env={}" .format (tf_triggering_env ),
862
912
]
913
+ if "hash" not in by_str_baseline :
914
+ filters_baseline .append ("hash==" )
915
+ if "hash" not in by_str_comparison :
916
+ filters_comparison .append ("hash==" )
863
917
if running_platform is not None :
864
918
filters_comparison .append ("running_platform={}" .format (running_platform ))
865
919
baseline_timeseries = rts .ts ().queryindex (filters_baseline )
@@ -1037,9 +1091,11 @@ def from_rts_to_regression_table(
1037
1091
test_link ,
1038
1092
)
1039
1093
if detected_regression :
1094
+ regressions_list .append (test_name )
1040
1095
table_regressions .append (line )
1041
1096
1042
1097
if detected_improvement :
1098
+ improvements_list .append (test_name )
1043
1099
table_improvements .append (line )
1044
1100
1045
1101
if unstable :
@@ -1072,6 +1128,8 @@ def from_rts_to_regression_table(
1072
1128
total_stable ,
1073
1129
total_unstable ,
1074
1130
total_comparison_points ,
1131
+ regressions_list ,
1132
+ improvements_list ,
1075
1133
)
1076
1134
1077
1135
0 commit comments