Reported pipeline duration is misleading

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

The reported pipeline duration is misleading from a user perspective, which I consider to be a bug!

For example,

image

could be taken to mean that the pipeline was completed in 1h8min, but that would be incorrect! As is, this message actually means that the total time "where at least one job was running" is 1h8min, while being pending for another 1h30 for a total wall clock elapsed duration of over 2h38min.

Steps to reproduce

Run any pipeline that has pending time due to, for example, unavailable runners.

What is the current bug behavior?

Described above.

What is the expected correct behavior?

There are various options here. My favourite would be changing the string from:

20 jobs from master in 68 minutes 27 seconds (queued for 2 seconds)

to

20 jobs from master, completed in 2h38, running for 1h08, queued for 2 seconds

which should be really simple to do, and sounds much more clear to me. If anything I will argue that the most useful time metric, from a user's perspective, is the elapsed time that the user had to wait from the moment the pipeline was triggered to when the user was notified of it being completed either successfully or failure.

Relevant logs and/or screenshots

See above.

Possible fixes

See above.

Edited by 🤖 GitLab Bot 🤖