Draft: Add 'Duration' tab to pipeline page
What does this MR do and why?
This MR adds a Durations tab to the pipeline page, which shows all jobs by their duration, so developers can improve pipeline efficiency by reducing duration.
References
Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
- Issue: Integrate 'Pipeline Visualizer' into GitLab (#508903)
- Feature flag: #508904 (closed)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
| Summary | Screeshot |
|---|---|
| Dark mode |
|
| Light mode |
|
| Reference (dark) |
|
| Reference (light) |
|
How to set up and validate locally
- In rails console enable the feature flag
Feature.enable(:ci_pipeline_durations_tab) - Go to a project
- Set up CI with a few example jobs, ideally using
needsandsleep(see the example below) - Run a pipeline
- Go to the pipeline
- Click on the Durations tab
- See the durations overview
Click to expand example CI config
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
long-job:
stage: build
script:
- for i in $(seq 5000); do echo "This is the very very very very very very very very very very very very very very very very very very very long line"; done
variables:
FF_TIMESTAMPS: true
short-job:
stage: test
needs: []
script:
- sleep 2
variables:
FF_TIMESTAMPS: true
slow-job:
stage: build
script:
- sleep 10
variables:
FF_TIMESTAMPS: true
woof-job:
stage: test
script: ["echo woof :3"]
variables:
FF_TIMESTAMPS: true
test-job:
stage: test
script: [echo TESTING]
rspec unit:
stage: test
needs: [test-job]
parallel: 5
script: [echo rspec, sleep 5]
rspec system:
stage: test
needs: [test-job, slow-job]
parallel: 3
script: [echo rspec, sleep 10]
rspec-collector-a:
needs: [rspec unit, rspec system]
script: [echo cowwecting covewage vewwy hawd :o]
Edited by Kev Kloss



