diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 16:18:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 16:18:24 +0300 |
commit | 0653e08efd039a5905f3fa4f6e9cef9f5d2f799c (patch) | |
tree | 4dcc884cf6d81db44adae4aa99f8ec1233a41f55 /lib/gitlab/ci/pipeline/metrics.rb | |
parent | 744144d28e3e7fddc117924fef88de5d9674fe4c (diff) |
Add latest changes from gitlab-org/gitlab@14-3-stable-eev14.3.0-rc42
Diffstat (limited to 'lib/gitlab/ci/pipeline/metrics.rb')
-rw-r--r-- | lib/gitlab/ci/pipeline/metrics.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/gitlab/ci/pipeline/metrics.rb b/lib/gitlab/ci/pipeline/metrics.rb index 10de77afe74..28df9f5386c 100644 --- a/lib/gitlab/ci/pipeline/metrics.rb +++ b/lib/gitlab/ci/pipeline/metrics.rb @@ -4,6 +4,8 @@ module Gitlab module Ci module Pipeline class Metrics + extend Gitlab::Utils::StrongMemoize + def self.pipeline_creation_duration_histogram name = :gitlab_ci_pipeline_creation_duration_seconds comment = 'Pipeline creation duration' @@ -13,6 +15,17 @@ module Gitlab ::Gitlab::Metrics.histogram(name, comment, labels, buckets) end + def self.pipeline_creation_step_duration_histogram + strong_memoize(:pipeline_creation_step_histogram) do + name = :gitlab_ci_pipeline_creation_step_duration_seconds + comment = 'Duration of each pipeline creation step' + labels = { step: nil } + 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) + end + end + def self.pipeline_security_orchestration_policy_processing_duration_histogram name = :gitlab_ci_pipeline_security_orchestration_policy_processing_duration_seconds comment = 'Pipeline security orchestration policy processing duration' |