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