Skip to content
Closed
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
7 changes: 5 additions & 2 deletions src/server/routes/ui/experiments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,11 @@ fn humanize(duration: Duration) -> String {
let duration = match duration.to_std() {
Ok(d) => d,
Err(_) => {
// Don't try to make it pretty as a fallback.
return format!("{duration:?}");
// A negative duration (e.g. the "estimated end" of an experiment
// whose jobs have all finished but not yet been cleaned up) can't be
// converted to a `std::time::Duration`. Report it as zero instead of
// the raw `TimeDelta { secs: -1, ... }` debug output.
return "0 seconds".to_string();
}
};
if duration.as_secs() < 60 {
Expand Down
Loading