Display the duration of each stage on the pipeline page
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem to solve
As a devops engineer reviewing pipelines, I want to see job/stage duration on the pipeline detail, so I can quickly see the bottlenecks in my pipelines.
We can't see the duration of each stage anywhere, only the duration of the pipeline and the duration of each job in the pipeline. This information would be very useful.
Intended users
All GitLab users
Further details
- We want to be able to view the duration of a pipeline stage.
- Note that adding up stages may not result in either wall clock or total duration time depending on how counted.
Questions to answer
-
Should stage duration be total of duration time for the stage OR finish time of the last job ran in the stage less the start time of the first job ran in the stage? -
What's the UX for this? (where does it appear, is it interactive? etc.) -
Is the the data available already to the front end to show the calculated duration based on the answer of question 1?
Proposal
Product Note: This shouldn't be prescriptive, we can show job/stage/both timing or something else if it's a better solution to the problem for our MVC. We should add tracking (hover/clicks/something) to see how many users are interacting with this feature vs. the total who see the graph to use as an input for next iterations.
Display the duration of each stage on the pipeline page as in picture:
Technical Details
From some research @mbobin did in another issue:
I looked at how we do it for pipelines and it seems that we persist the duration value in the pipelines table when there is a status change to one of the completed statuses: https://gitlab.com/gitlab-org/gitlab/-/blob/52b3971c88e8a405b2b247b0835829b8660465fd/app/models/ci/pipeline.rb#L204-211 I think we should do the same for stages.
The documentation for the code used to compute this duration is really nice: https://gitlab.com/gitlab-org/gitlab/-/blob/52b3971c88e8a405b2b247b0835829b8660465fd/lib/gitlab/ci/pipeline/duration.rb
Permissions and Security
None
Documentation
Testing
What does success look like, and how can we measure that?
Success Criteria
- TBD
Acceptance Criteria
- Some sort of timing of a job/stage is displayed on the graph page
- There is tracking in snowplow product can use to see how many users on gitlab.com have interacted with the feature (click to display the data if going that way)
Links / references
- This idea will be tested with Frontend: Experiment Implementation: "Performan... (#363512 - closed) in %15.2 and then this and other related issues may be scheduled.
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.
