Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
What's new
6
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gitlab-org
gitlab-exporter
Commits
1bb6d220
Commit
1bb6d220
authored
Mar 01, 2017
by
Ben Kochie
Browse files
Fixup "other" bucketing
* Don't create the "other" buckets until after all other buckets are done.
parent
55a59997
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/gitlab_monitor/database/ci_builds.rb
View file @
1bb6d220
...
...
@@ -141,16 +141,16 @@ module GitLab
shared_runners
=
metric
[
:shared_runners
]
namespace
=
metric
[
:namespace
]
value
=
metric
[
:value
]
# If we have a low value, put the value into an "other" bucket.
if
value
<
10
other_value
[
shared_runners
]
+=
value
value
=
other_value
[
shared_runners
]
namespace
=
""
else
@metrics
.
add
(
metric_name
,
value
,
namespace:
namespace
,
shared_runners:
shared_runners
)
end
@metrics
.
add
(
metric_name
,
value
,
namespace:
namespace
,
shared_runners:
shared_runners
)
end
# Add metrics for the "other" bucket.
@metrics
.
add
(
metric_name
,
other_value
[
"yes"
],
namespace:
""
,
shared_runners:
"yes"
)
@metrics
.
add
(
metric_name
,
other_value
[
"no"
],
namespace:
""
,
shared_runners:
"no"
)
end
def
ci_stale_builds_metrics
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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