Rollup merge of #148237 - Zalathar:analysis-signed, r=Kobzol

citool: Always print a signed percentage in job duration changes

I found myself confused by these percentage deltas, because it's not immediately obvious whether a change of 110% means “a little bit worse” (+10%, 110% overall) or ”more than twice as long” (+110%, 210% overall). The correct interpretation is “more than twice as long”.

Including a sign for positive percentages should hopefully make it clearer that they are relative to a baseline of ±0%, not a baseline of 100%.

Manually tested with:
```text
cargo run --manifest-path src/ci/citool/Cargo.toml post-merge-report df984edf44 c9537a94a6
```

r? Kobzol
This commit is contained in:
Matthias Krüger
2025-10-29 12:57:06 +01:00
committed by GitHub

View File

@@ -237,7 +237,7 @@ pub fn output_largest_duration_changes(
println!("# Job duration changes"); println!("# Job duration changes");
for (index, entry) in changes.into_iter().take(10).enumerate() { for (index, entry) in changes.into_iter().take(10).enumerate() {
println!( println!(
"{}. {}: {:.1}s -> {:.1}s ({:.1}%)", "{}. {}: {:.1}s -> {:.1}s ({:+.1}%)",
index + 1, index + 1,
format_job_link(job_info_resolver, job_metrics, entry.job), format_job_link(job_info_resolver, job_metrics, entry.job),
entry.before.as_secs_f64(), entry.before.as_secs_f64(),