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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
043545de
Commit
043545de
authored
Oct 17, 2017
by
Pawel Chojnacki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unnecessary namespace use
parent
534f6b11
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
lib/gitlab/metrics/histogram_buckets.rb
lib/gitlab/metrics/histogram_buckets.rb
+0
-0
lib/gitlab/metrics/samplers/ruby_sampler.rb
lib/gitlab/metrics/samplers/ruby_sampler.rb
+7
-7
No files found.
lib/gitlab/metrics/histogram_buckets.rb
0 → 100644
View file @
043545de
lib/gitlab/metrics/samplers/ruby_sampler.rb
View file @
043545de
...
...
@@ -23,7 +23,7 @@ module Gitlab
def
initialize
(
interval
)
super
(
interval
)
if
Gitlab
::
Metrics
.
mri?
if
Metrics
.
mri?
require
'allocations'
Allocations
.
start
...
...
@@ -32,15 +32,15 @@ module Gitlab
def
init_metrics
metrics
=
{}
metrics
[
:sampler_duration
]
=
Gitlab
::
Metrics
.
histogram
(
with_prefix
(
:sampler_duration
,
:seconds
),
'Sampler time'
,
{})
metrics
[
:total_time
]
=
Gitlab
::
Metrics
.
gauge
(
with_prefix
(
:gc
,
:time_total
),
'Total GC time'
,
labels
,
:livesum
)
metrics
[
:sampler_duration
]
=
Metrics
.
histogram
(
with_prefix
(
:sampler_duration
,
:seconds
),
'Sampler time'
,
{})
metrics
[
:total_time
]
=
Metrics
.
gauge
(
with_prefix
(
:gc
,
:time_total
),
'Total GC time'
,
labels
,
:livesum
)
GC
.
stat
.
keys
.
each
do
|
key
|
metrics
[
key
]
=
Gitlab
::
Metrics
.
gauge
(
with_prefix
(
:gc
,
key
),
to_doc_string
(
key
),
labels
,
:livesum
)
metrics
[
key
]
=
Metrics
.
gauge
(
with_prefix
(
:gc
,
key
),
to_doc_string
(
key
),
labels
,
:livesum
)
end
metrics
[
:objects_total
]
=
Gitlab
::
Metrics
.
gauge
(
with_prefix
(
:objects
,
:total
),
'Objects total'
,
labels
.
merge
(
class:
nil
),
:livesum
)
metrics
[
:memory_usage
]
=
Gitlab
::
Metrics
.
gauge
(
with_prefix
(
:memory
,
:usage_total
),
'Memory used total'
,
labels
,
:livesum
)
metrics
[
:file_descriptors
]
=
Gitlab
::
Metrics
.
gauge
(
with_prefix
(
:file
,
:descriptors_total
),
'File descriptors total'
,
labels
,
:livesum
)
metrics
[
:objects_total
]
=
Metrics
.
gauge
(
with_prefix
(
:objects
,
:total
),
'Objects total'
,
labels
.
merge
(
class:
nil
),
:livesum
)
metrics
[
:memory_usage
]
=
Metrics
.
gauge
(
with_prefix
(
:memory
,
:usage_total
),
'Memory used total'
,
labels
,
:livesum
)
metrics
[
:file_descriptors
]
=
Metrics
.
gauge
(
with_prefix
(
:file
,
:descriptors_total
),
'File descriptors total'
,
labels
,
:livesum
)
metrics
end
...
...
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