Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
d86702b9
Commit
d86702b9
authored
Aug 03, 2021
by
Adrien Kohlbecker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add gauge metric on ci queue size
Changelog: added
parent
3a8dd9a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
lib/gitlab/ci/queue/metrics.rb
lib/gitlab/ci/queue/metrics.rb
+12
-1
No files found.
lib/gitlab/ci/queue/metrics.rb
View file @
d86702b9
...
...
@@ -97,7 +97,9 @@ module Gitlab
def
observe_queue_size
(
size_proc
,
runner_type
)
return
unless
Feature
.
enabled?
(
:gitlab_ci_builds_queuing_metrics
,
default_enabled:
false
)
self
.
class
.
queue_size_total
.
observe
({
runner_type:
runner_type
},
size_proc
.
call
.
to_f
)
size
=
size_proc
.
call
.
to_f
self
.
class
.
queue_size_total
.
observe
({
runner_type:
runner_type
},
size
)
self
.
class
.
current_queue_size
.
set
({
runner_type:
runner_type
},
size
)
end
def
observe_queue_time
(
metric
,
runner_type
)
...
...
@@ -199,6 +201,15 @@ module Gitlab
end
end
def
self
.
current_queue_size
strong_memoize
(
:current_queue_size
)
do
name
=
:gitlab_ci_current_queue_size
comment
=
'Current size of initialized CI/CD builds queue'
Gitlab
::
Metrics
.
gauge
(
name
,
comment
)
end
end
def
self
.
queue_iteration_duration_seconds
strong_memoize
(
:queue_iteration_duration_seconds
)
do
name
=
:gitlab_ci_queue_iteration_duration_seconds
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment