@@ -48,7 +48,6 @@ pub async fn handle_triage(
48
48
"instructions:u" . to_owned ( ) ,
49
49
ctxt,
50
50
& master_commits,
51
- body. calcNewSig . unwrap_or ( false ) ,
52
51
)
53
52
. await
54
53
. map_err ( |e| format ! ( "error comparing commits: {}" , e) ) ?
@@ -97,17 +96,11 @@ pub async fn handle_compare(
97
96
. await
98
97
. map_err ( |e| format ! ( "error retrieving master commit list: {}" , e) ) ?;
99
98
let end = body. end ;
100
- let comparison = compare_given_commits (
101
- body. start ,
102
- end. clone ( ) ,
103
- body. stat ,
104
- ctxt,
105
- & master_commits,
106
- body. calcNewSig . unwrap_or ( false ) ,
107
- )
108
- . await
109
- . map_err ( |e| format ! ( "error comparing commits: {}" , e) ) ?
110
- . ok_or_else ( || format ! ( "could not find end commit for bound {:?}" , end) ) ?;
99
+ let comparison =
100
+ compare_given_commits ( body. start , end. clone ( ) , body. stat , ctxt, & master_commits)
101
+ . await
102
+ . map_err ( |e| format ! ( "error comparing commits: {}" , e) ) ?
103
+ . ok_or_else ( || format ! ( "could not find end commit for bound {:?}" , end) ) ?;
111
104
112
105
let conn = ctxt. conn ( ) . await ;
113
106
let prev = comparison. prev ( & master_commits) ;
@@ -353,7 +346,7 @@ pub async fn compare(
353
346
ctxt : & SiteCtxt ,
354
347
) -> Result < Option < Comparison > , BoxedError > {
355
348
let master_commits = collector:: master_commits ( ) . await ?;
356
- compare_given_commits ( start, end, stat, ctxt, & master_commits, false ) . await
349
+ compare_given_commits ( start, end, stat, ctxt, & master_commits) . await
357
350
}
358
351
359
352
/// Compare two bounds on a given stat
@@ -363,7 +356,6 @@ async fn compare_given_commits(
363
356
stat : String ,
364
357
ctxt : & SiteCtxt ,
365
358
master_commits : & [ collector:: MasterCommit ] ,
366
- calc_new_sig : bool ,
367
359
) -> Result < Option < Comparison > , BoxedError > {
368
360
let a = ctxt
369
361
. artifact_id_for_bound ( start. clone ( ) , true )
@@ -401,7 +393,6 @@ async fn compare_given_commits(
401
393
scenario : test_case. 2 ,
402
394
variance : variances. data . get ( & test_case) . cloned ( ) ,
403
395
results : ( a, b) ,
404
- calc_new_sig,
405
396
} )
406
397
} )
407
398
. collect ( ) ;
@@ -751,17 +742,10 @@ impl BenchmarkVariance {
751
742
}
752
743
753
744
/// Whether we can trust this benchmark or not
754
- fn is_dodgy ( & self , calc_new_sig : bool ) -> bool {
755
- if !calc_new_sig {
756
- matches ! (
757
- self . description,
758
- BenchmarkVarianceDescription :: Noisy | BenchmarkVarianceDescription :: HighlyVariable
759
- )
760
- } else {
761
- // If changes are judged significant only exceeding 0.2%, then the
762
- // benchmark as a whole is dodgy.
763
- self . significance_threshold ( ) * 100.0 > 0.2
764
- }
745
+ fn is_dodgy ( & self ) -> bool {
746
+ // If changes are judged significant only exceeding 0.2%, then the
747
+ // benchmark as a whole is dodgy.
748
+ self . significance_threshold ( ) * 100.0 > 0.2
765
749
}
766
750
}
767
751
@@ -816,18 +800,13 @@ pub struct TestResultComparison {
816
800
scenario : Scenario ,
817
801
variance : Option < BenchmarkVariance > ,
818
802
results : ( f64 , f64 ) ,
819
- calc_new_sig : bool ,
820
803
}
821
804
822
805
impl TestResultComparison {
823
806
/// The amount of relative change considered significant when
824
807
/// we cannot determine from historical data
825
808
const SIGNIFICANT_RELATIVE_CHANGE_THRESHOLD : f64 = 0.002 ;
826
809
827
- /// The amount of relative change considered significant when
828
- /// the test case is dodgy
829
- const SIGNIFICANT_RELATIVE_CHANGE_THRESHOLD_DODGY : f64 = 0.008 ;
830
-
831
810
fn is_regression ( & self ) -> bool {
832
811
let ( a, b) = self . results ;
833
812
b > a
@@ -843,18 +822,10 @@ impl TestResultComparison {
843
822
844
823
// Magnitude of change considered significant
845
824
fn significance_threshold ( & self ) -> f64 {
846
- if !self . calc_new_sig {
847
- if self . is_dodgy ( ) {
848
- Self :: SIGNIFICANT_RELATIVE_CHANGE_THRESHOLD_DODGY
849
- } else {
850
- Self :: SIGNIFICANT_RELATIVE_CHANGE_THRESHOLD
851
- }
852
- } else {
853
- self . variance
854
- . as_ref ( )
855
- . map ( |v| v. significance_threshold ( ) )
856
- . unwrap_or ( Self :: SIGNIFICANT_RELATIVE_CHANGE_THRESHOLD )
857
- }
825
+ self . variance
826
+ . as_ref ( )
827
+ . map ( |v| v. significance_threshold ( ) )
828
+ . unwrap_or ( Self :: SIGNIFICANT_RELATIVE_CHANGE_THRESHOLD )
858
829
}
859
830
860
831
/// This is a numeric magnitude of a particular change.
@@ -879,9 +850,6 @@ impl TestResultComparison {
879
850
} else {
880
851
Magnitude :: VeryLarge
881
852
} ;
882
- if !self . calc_new_sig {
883
- return over_threshold;
884
- }
885
853
let change_magnitude = if change < 0.002 {
886
854
Magnitude :: VerySmall
887
855
} else if change < 0.01 {
@@ -918,7 +886,7 @@ impl TestResultComparison {
918
886
fn is_dodgy ( & self ) -> bool {
919
887
self . variance
920
888
. as_ref ( )
921
- . map ( |v| v. is_dodgy ( self . calc_new_sig ) )
889
+ . map ( |v| v. is_dodgy ( ) )
922
890
. unwrap_or ( false )
923
891
}
924
892
0 commit comments