@@ -638,7 +638,7 @@ pub async fn post_finished(data: &InputData) {
638
638
format ! (
639
639
"Finished benchmarking try commit ({}): [comparison url]({}).
640
640
641
- Summary: {}
641
+ ** Summary** : {}
642
642
643
643
Benchmarking this pull request likely means that it is \
644
644
perf-sensitive, so we're automatically marking it as not fit \
@@ -672,12 +672,25 @@ async fn categorize_benchmark(commit: &database::QueuedCommit, data: &InputData)
672
672
Ok ( Some ( c) ) => c,
673
673
_ => return String :: from ( "ERROR categorizing benchmark run!" ) ,
674
674
} ;
675
- let summary = match crate :: comparison:: ComparisonSummary :: summarize_comparison ( & comparison) {
676
- Some ( s) => s,
677
- None => return String :: from ( "This benchmark run did not return any significant changes" ) ,
675
+ let ( summary, direction) =
676
+ match crate :: comparison:: ComparisonSummary :: summarize_comparison ( & comparison) {
677
+ Some ( s) if s. direction ( ) . is_some ( ) => {
678
+ let direction = s. direction ( ) . unwrap ( ) ;
679
+ ( s, direction)
680
+ }
681
+ _ => return String :: from ( "This benchmark run did not return any significant changes" ) ,
682
+ } ;
683
+
684
+ use crate :: comparison:: Direction ;
685
+ let category = match direction {
686
+ Direction :: Improvement => "improvements 🎉" ,
687
+ Direction :: Regression => "regressions 😿" ,
688
+ Direction :: Mixed => "mixed results 🤷" ,
678
689
} ;
679
-
680
- let mut result = format ! ( "This change led to significant changes in compiler performance.\n " ) ;
690
+ let mut result = format ! (
691
+ "This change led to significant {} in compiler performance.\n " ,
692
+ category
693
+ ) ;
681
694
for change in summary. ordered_changes ( ) {
682
695
use std:: fmt:: Write ;
683
696
write ! ( result, "- " ) . unwrap ( ) ;
0 commit comments