@@ -51,7 +51,6 @@ pub async fn handle_triage(
51
51
"instructions:u" . to_owned ( ) ,
52
52
ctxt,
53
53
& master_commits,
54
- body. calcNewSig . unwrap_or ( true ) ,
55
54
)
56
55
. await
57
56
. map_err ( |e| format ! ( "error comparing commits: {}" , e) ) ?
@@ -100,17 +99,11 @@ pub async fn handle_compare(
100
99
. await
101
100
. map_err ( |e| format ! ( "error retrieving master commit list: {}" , e) ) ?;
102
101
let end = body. end ;
103
- let comparison = compare_given_commits (
104
- body. start ,
105
- end. clone ( ) ,
106
- body. stat ,
107
- ctxt,
108
- & master_commits,
109
- body. calcNewSig . unwrap_or ( true ) ,
110
- )
111
- . await
112
- . map_err ( |e| format ! ( "error comparing commits: {}" , e) ) ?
113
- . ok_or_else ( || format ! ( "could not find end commit for bound {:?}" , end) ) ?;
102
+ let comparison =
103
+ compare_given_commits ( body. start , end. clone ( ) , body. stat , ctxt, & master_commits)
104
+ . await
105
+ . map_err ( |e| format ! ( "error comparing commits: {}" , e) ) ?
106
+ . ok_or_else ( || format ! ( "could not find end commit for bound {:?}" , end) ) ?;
114
107
115
108
let conn = ctxt. conn ( ) . await ;
116
109
let prev = comparison. prev ( & master_commits) ;
@@ -441,7 +434,7 @@ pub async fn compare(
441
434
ctxt : & SiteCtxt ,
442
435
) -> Result < Option < Comparison > , BoxedError > {
443
436
let master_commits = collector:: master_commits ( ) . await ?;
444
- compare_given_commits ( start, end, stat, ctxt, & master_commits, true ) . await
437
+ compare_given_commits ( start, end, stat, ctxt, & master_commits) . await
445
438
}
446
439
447
440
/// Compare two bounds on a given stat
@@ -451,7 +444,6 @@ async fn compare_given_commits(
451
444
stat : String ,
452
445
ctxt : & SiteCtxt ,
453
446
master_commits : & [ collector:: MasterCommit ] ,
454
- calc_new_sig : bool ,
455
447
) -> Result < Option < Comparison > , BoxedError > {
456
448
let idx = ctxt. index . load ( ) ;
457
449
let a = ctxt
@@ -490,7 +482,6 @@ async fn compare_given_commits(
490
482
scenario : test_case. 2 ,
491
483
variance : variances. data . get ( & test_case) . cloned ( ) ,
492
484
results : ( a, b) ,
493
- calc_new_sig,
494
485
} )
495
486
} )
496
487
. collect ( ) ;
@@ -865,17 +856,10 @@ impl BenchmarkVariance {
865
856
}
866
857
867
858
/// Whether we can trust this benchmark or not
868
- fn is_dodgy ( & self , calc_new_sig : bool ) -> bool {
869
- if !calc_new_sig {
870
- matches ! (
871
- self . description,
872
- BenchmarkVarianceDescription :: Noisy | BenchmarkVarianceDescription :: HighlyVariable
873
- )
874
- } else {
875
- // If changes are judged significant only exceeding 0.2%, then the
876
- // benchmark as a whole is dodgy.
877
- self . significance_threshold ( ) * 100.0 > 0.2
878
- }
859
+ fn is_dodgy ( & self ) -> bool {
860
+ // If changes are judged significant only exceeding 0.2%, then the
861
+ // benchmark as a whole is dodgy.
862
+ self . significance_threshold ( ) * 100.0 > 0.2
879
863
}
880
864
}
881
865
@@ -930,18 +914,13 @@ pub struct TestResultComparison {
930
914
scenario : Scenario ,
931
915
variance : Option < BenchmarkVariance > ,
932
916
results : ( f64 , f64 ) ,
933
- calc_new_sig : bool ,
934
917
}
935
918
936
919
impl TestResultComparison {
937
920
/// The amount of relative change considered significant when
938
921
/// we cannot determine from historical data
939
922
const SIGNIFICANT_RELATIVE_CHANGE_THRESHOLD : f64 = 0.002 ;
940
923
941
- /// The amount of relative change considered significant when
942
- /// the test case is dodgy
943
- const SIGNIFICANT_RELATIVE_CHANGE_THRESHOLD_DODGY : f64 = 0.008 ;
944
-
945
924
fn is_regression ( & self ) -> bool {
946
925
let ( a, b) = self . results ;
947
926
b > a
@@ -958,18 +937,10 @@ impl TestResultComparison {
958
937
959
938
/// Magnitude of change considered significant
960
939
fn significance_threshold ( & self ) -> f64 {
961
- if !self . calc_new_sig {
962
- if self . is_dodgy ( ) {
963
- Self :: SIGNIFICANT_RELATIVE_CHANGE_THRESHOLD_DODGY
964
- } else {
965
- Self :: SIGNIFICANT_RELATIVE_CHANGE_THRESHOLD
966
- }
967
- } else {
968
- self . variance
969
- . as_ref ( )
970
- . map ( |v| v. significance_threshold ( ) )
971
- . unwrap_or ( Self :: SIGNIFICANT_RELATIVE_CHANGE_THRESHOLD )
972
- }
940
+ self . variance
941
+ . as_ref ( )
942
+ . map ( |v| v. significance_threshold ( ) )
943
+ . unwrap_or ( Self :: SIGNIFICANT_RELATIVE_CHANGE_THRESHOLD )
973
944
}
974
945
975
946
/// This is a numeric magnitude of a particular change.
@@ -994,9 +965,6 @@ impl TestResultComparison {
994
965
} else {
995
966
Magnitude :: VeryLarge
996
967
} ;
997
- if !self . calc_new_sig {
998
- return over_threshold;
999
- }
1000
968
let change_magnitude = if change < 0.002 {
1001
969
Magnitude :: VerySmall
1002
970
} else if change < 0.01 {
@@ -1033,7 +1001,7 @@ impl TestResultComparison {
1033
1001
fn is_dodgy ( & self ) -> bool {
1034
1002
self . variance
1035
1003
. as_ref ( )
1036
- . map ( |v| v. is_dodgy ( self . calc_new_sig ) )
1004
+ . map ( |v| v. is_dodgy ( ) )
1037
1005
. unwrap_or ( false )
1038
1006
}
1039
1007
0 commit comments