@@ -125,7 +125,10 @@ pub async fn handle_compare(
125125 } )
126126 . collect ( ) ;
127127
128- let mut new_errors = comparison. new_errors . into_iter ( ) . collect :: < Vec < _ > > ( ) ;
128+ let mut new_errors = comparison
129+ . newly_failed_benchmarks
130+ . into_iter ( )
131+ . collect :: < Vec < _ > > ( ) ;
129132 new_errors. sort ( ) ;
130133 Ok ( api:: comparison:: Response {
131134 prev,
@@ -172,8 +175,6 @@ pub struct ComparisonSummary {
172175 num_improvements : usize ,
173176 /// The cached number of comparisons that are regressions
174177 num_regressions : usize ,
175- /// Which benchmarks had errors
176- errors_in : Vec < String > ,
177178}
178179
179180impl ComparisonSummary {
@@ -207,13 +208,10 @@ impl ComparisonSummary {
207208 } ;
208209 comparisons. sort_by ( cmp) ;
209210
210- let errors_in = comparison. new_errors . keys ( ) . cloned ( ) . collect :: < Vec < _ > > ( ) ;
211-
212211 Some ( ComparisonSummary {
213212 comparisons,
214213 num_improvements,
215214 num_regressions,
216- errors_in,
217215 } )
218216 }
219217
@@ -222,7 +220,6 @@ impl ComparisonSummary {
222220 comparisons : vec ! [ ] ,
223221 num_improvements : 0 ,
224222 num_regressions : 0 ,
225- errors_in : vec ! [ ] ,
226223 }
227224 }
228225
@@ -319,10 +316,6 @@ impl ComparisonSummary {
319316 self . comparisons . is_empty ( )
320317 }
321318
322- pub fn errors_in ( & self ) -> & [ String ] {
323- & self . errors_in
324- }
325-
326319 fn arithmetic_mean < ' a > (
327320 & ' a self ,
328321 changes : impl Iterator < Item = & ' a TestResultComparison > ,
@@ -607,7 +600,7 @@ async fn compare_given_commits(
607600 a : ArtifactDescription :: for_artifact ( & * conn, a. clone ( ) , master_commits) . await ,
608601 b : ArtifactDescription :: for_artifact ( & * conn, b. clone ( ) , master_commits) . await ,
609602 statistics,
610- new_errors : errors_in_b. into_iter ( ) . collect ( ) ,
603+ newly_failed_benchmarks : errors_in_b. into_iter ( ) . collect ( ) ,
611604 } ) )
612605}
613606
@@ -755,7 +748,7 @@ pub struct Comparison {
755748 /// Statistics based on test case
756749 pub statistics : HashSet < TestResultComparison > ,
757750 /// A map from benchmark name to an error which occured when building `b` but not `a`.
758- pub new_errors : HashMap < String , String > ,
751+ pub newly_failed_benchmarks : HashMap < String , String > ,
759752}
760753
761754impl Comparison {
@@ -798,21 +791,21 @@ impl Comparison {
798791 . partition ( |s| category_map. get ( & s. benchmark ( ) ) == Some ( & Category :: Primary ) ) ;
799792
800793 let ( primary_errors, secondary_errors) = self
801- . new_errors
794+ . newly_failed_benchmarks
802795 . into_iter ( )
803796 . partition ( |( b, _) | category_map. get ( & b. as_str ( ) . into ( ) ) == Some ( & Category :: Primary ) ) ;
804797
805798 let primary = Comparison {
806799 a : self . a . clone ( ) ,
807800 b : self . b . clone ( ) ,
808801 statistics : primary,
809- new_errors : primary_errors,
802+ newly_failed_benchmarks : primary_errors,
810803 } ;
811804 let secondary = Comparison {
812805 a : self . a ,
813806 b : self . b ,
814807 statistics : secondary,
815- new_errors : secondary_errors,
808+ newly_failed_benchmarks : secondary_errors,
816809 } ;
817810 (
818811 ComparisonSummary :: summarize_comparison ( & primary) ,
@@ -1516,7 +1509,7 @@ mod tests {
15161509 bootstrap_total : 0 ,
15171510 } ,
15181511 statistics,
1519- new_errors : Default :: default ( ) ,
1512+ newly_failed_benchmarks : Default :: default ( ) ,
15201513 } ;
15211514 ComparisonSummary :: summarize_comparison ( & comparison)
15221515 . unwrap_or_else ( || ComparisonSummary :: empty ( ) )
0 commit comments