Skip to content

Commit 684f4f7

Browse files
committed
More clearly indicate procedure after perf run completes
1 parent 50b1698 commit 684f4f7

File tree

1 file changed

+28
-8
lines changed

1 file changed

+28
-8
lines changed

site/src/github.rs

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,32 @@ pub async fn post_finished(data: &InputData) {
637637
Some(Direction::Regression | Direction::Mixed) => "+perf-regression",
638638
Some(Direction::Improvement) | None => "-perf-regression",
639639
};
640+
let msg = direction
641+
.map(|d| {
642+
format!(
643+
"While you can manually mark this PR as fit \
644+
for rollup, we strongly recommend not doing so since this PR led to changes in \
645+
compiler perf.{}",
646+
match d {
647+
Direction::Regression | Direction::Mixed =>
648+
"\n\n**Next Steps**: If you can justify the \
649+
regressions found in this perf run, please indicate this with \
650+
`@rustbot label: +perf-regression-justified` along with \
651+
sufficient written justification. If you cannot justify the regressions \
652+
please fix the regressions and do another perf run. If the next run shows \
653+
neutral or positive results, the label will be automatically removed.",
654+
_ => "",
655+
}
656+
)
657+
})
658+
.unwrap_or(
659+
"Please note that since \
660+
performance does not seem to be significantly changed, you may *consider* undoing the \
661+
rollup directive by specifying `@bors rollup-`. Only do this if you strongly believe \
662+
the PR will continue to not lead to performance changes after merging."
663+
.to_owned(),
664+
);
665+
640666
post_comment(
641667
&data.config,
642668
commit.pr,
@@ -647,17 +673,11 @@ pub async fn post_finished(data: &InputData) {
647673
648674
Benchmarking this pull request likely means that it is \
649675
perf-sensitive, so we're automatically marking it as not fit \
650-
for rolling up. Please note that if the perf results are \
651-
neutral, you should likely undo the rollup=never given below \
652-
by specifying `rollup-` to bors.
653-
654-
Importantly, though, if the results of this run are \
655-
non-neutral **do not** roll this PR up -- it will mask other \
656-
regressions or improvements in the roll up.
676+
for rolling up. {}
657677
658678
@bors rollup=never
659679
@rustbot label: +S-waiting-on-review -S-waiting-on-perf {}",
660-
commit.sha, comparison_url, summary, label
680+
commit.sha, comparison_url, summary, msg, label
661681
),
662682
)
663683
.await;

0 commit comments

Comments
 (0)