Sort job duration changes by absolute duration
It was supposed to be like this from the start, but I forgot to apply the `abs` operation, as I got sidetracked with how to actually compare floats...
This commit is contained in:
parent
b9856b6e40
commit
1a4863421b
1 changed files with 1 additions and 1 deletions
|
|
@ -225,7 +225,7 @@ pub fn output_largest_duration_changes(job_metrics: &HashMap<JobName, JobMetrics
|
|||
});
|
||||
}
|
||||
}
|
||||
changes.sort_by(|e1, e2| e1.change.partial_cmp(&e2.change).unwrap().reverse());
|
||||
changes.sort_by(|e1, e2| e1.change.abs().partial_cmp(&e2.change.abs()).unwrap().reverse());
|
||||
|
||||
println!("# Job duration changes");
|
||||
for (index, entry) in changes.into_iter().take(10).enumerate() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue