Skip to content

Commit e677944

Browse files
authored
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 df984ed c9537a9 ``` r? Kobzol
2 parents 6985d9a + 51f3cab commit e677944

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ci/citool/src/analysis.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ pub fn output_largest_duration_changes(
237237
println!("# Job duration changes");
238238
for (index, entry) in changes.into_iter().take(10).enumerate() {
239239
println!(
240-
"{}. {}: {:.1}s -> {:.1}s ({:.1}%)",
240+
"{}. {}: {:.1}s -> {:.1}s ({:+.1}%)",
241241
index + 1,
242242
format_job_link(job_info_resolver, job_metrics, entry.job),
243243
entry.before.as_secs_f64(),

0 commit comments

Comments
 (0)