@@ -727,37 +727,38 @@ fn next_steps(
727
727
is_master_commit : bool ,
728
728
) -> String {
729
729
let deserves_attention = deserves_attention_icount ( & primary, & secondary) ;
730
- let label = match ( deserves_attention, direction) {
731
- ( true , Some ( Direction :: Regression | Direction :: Mixed ) ) => "+perf-regression" ,
732
- _ => "-perf-regression" ,
730
+ let ( is_regression , label) = match ( deserves_attention, direction) {
731
+ ( true , Some ( Direction :: Regression | Direction :: Mixed ) ) => ( true , "+perf-regression" ) ,
732
+ _ => ( false , "-perf-regression" ) ,
733
733
} ;
734
734
735
735
if is_master_commit {
736
- master_run_body ( label )
736
+ master_run_body ( is_regression )
737
737
} else {
738
738
try_run_body ( label)
739
739
}
740
740
}
741
741
742
- fn master_run_body ( label : & str ) -> String {
743
- let next_steps = if label. starts_with ( "+" ) {
744
- "\n \n **Next Steps**: If you can justify the \
745
- regressions found in this perf run, please indicate this with \
746
- `@rustbot label: +perf-regression-triaged` along with \
747
- sufficient written justification. If you cannot justify the regressions \
748
- please open an issue or create a new PR that fixes the regressions, \
749
- add a comment linking to the newly created issue or PR, \
750
- and then add the `perf-regression-triaged` label to this PR."
742
+ fn master_run_body ( is_regression : bool ) -> String {
743
+ if is_regression {
744
+ "
745
+ **Next Steps**: If you can justify the \
746
+ regressions found in this perf run, please indicate this with \
747
+ `@rustbot label: +perf-regression-triaged` along with \
748
+ sufficient written justification. If you cannot justify the regressions \
749
+ please open an issue or create a new PR that fixes the regressions, \
750
+ add a comment linking to the newly created issue or PR, \
751
+ and then add the `perf-regression-triaged` label to this PR.
752
+
753
+ @rustbot label: +perf-regression
754
+ cc @rust-lang/wg-compiler-performance
755
+ "
751
756
} else {
752
- ""
753
- } ;
754
-
755
- format ! (
756
757
"
757
- {next_steps}
758
-
759
- @rustbot label: {label}" ,
760
- )
758
+ @rustbot label: -perf-regression
759
+ "
760
+ }
761
+ . to_string ( )
761
762
}
762
763
763
764
fn try_run_body ( label : & str ) -> String {
0 commit comments