Skip to content

cc @rust-lang/wg-compiler-performance on master perf regressions. #1369

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 22 additions & 21 deletions site/src/github.rs
Original file line number Diff line number Diff line change
Expand Up @@ -723,37 +723,38 @@ fn next_steps(
is_master_commit: bool,
) -> String {
let deserves_attention = deserves_attention_icount(&primary, &secondary);
let label = match (deserves_attention, direction) {
(true, Some(Direction::Regression | Direction::Mixed)) => "+perf-regression",
_ => "-perf-regression",
let (is_regression, label) = match (deserves_attention, direction) {
(true, Some(Direction::Regression | Direction::Mixed)) => (true, "+perf-regression"),
_ => (false, "-perf-regression"),
};

if is_master_commit {
master_run_body(label)
master_run_body(is_regression)
} else {
try_run_body(label)
}
}

fn master_run_body(label: &str) -> String {
let next_steps = if label.starts_with("+") {
"\n\n**Next Steps**: If you can justify the \
regressions found in this perf run, please indicate this with \
`@rustbot label: +perf-regression-triaged` along with \
sufficient written justification. If you cannot justify the regressions \
please open an issue or create a new PR that fixes the regressions, \
add a comment linking to the newly created issue or PR, \
and then add the `perf-regression-triaged` label to this PR."
fn master_run_body(is_regression: bool) -> String {
if is_regression {
"
**Next Steps**: If you can justify the \
regressions found in this perf run, please indicate this with \
`@rustbot label: +perf-regression-triaged` along with \
sufficient written justification. If you cannot justify the regressions \
please open an issue or create a new PR that fixes the regressions, \
add a comment linking to the newly created issue or PR, \
and then add the `perf-regression-triaged` label to this PR.

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance
"
} else {
""
};

format!(
"
{next_steps}

@rustbot label: {label}",
)
@rustbot label: -perf-regression
"
}
.to_string()
}

fn try_run_body(label: &str) -> String {
Expand Down