Skip to content
Snippets Groups Projects
Unverified Commit 95155e0b authored by Avielle Wolfe's avatar Avielle Wolfe
Browse files

Track duration of each step in one histogram

Tracking them all in separate histograms would make the PE dashboard
very large and slightly messy
parent 87d830f3
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -14,10 +14,9 @@ def self.pipeline_creation_duration_histogram
end
 
def self.pipeline_creation_step_duration_histogram(step)
name = "#{step}_duration_seconds".to_sym
description = step.gsub('gitlab_ci_', '').tr('_', ' ')
comment = "Duration of the #{description}"
labels = {}
name = :pipeline_creation_step_duration_seconds
comment = 'Duration of each pipeline creation step'
labels = { step: step.remove('gitlab_ci_') }
buckets = [0.01, 0.05, 0.1, 0.5, 1.0, 2.0, 5.0, 10.0, 15.0, 20.0, 50.0, 240.0]
 
::Gitlab::Metrics.histogram(name, comment, labels, buckets)
Loading
Loading
Loading
Loading
@@ -9,9 +9,9 @@
 
expect(::Gitlab::Metrics).to receive(:histogram)
.with(
:gitlab_ci_pipeline_chain_build_duration_seconds,
'Duration of the pipeline chain build',
{},
:pipeline_creation_step_duration_seconds,
'Duration of each pipeline creation step',
{ step: 'pipeline_chain_build' },
[0.01, 0.05, 0.1, 0.5, 1.0, 2.0, 5.0, 10.0, 15.0, 20.0, 50.0, 240.0]
)
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment