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
77e938a8
Commit
77e938a8
authored
Sep 07, 2017
by
Pawel Chojnacki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid using Send (but is it better?) + small rubocop cleanup
parent
19634c25
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
+8
-10
lib/gitlab/metrics/prometheus.rb
lib/gitlab/metrics/prometheus.rb
+1
-1
lib/gitlab/middleware/rails_queue_duration.rb
lib/gitlab/middleware/rails_queue_duration.rb
+7
-9
No files found.
lib/gitlab/metrics/prometheus.rb
View file @
77e938a8
...
@@ -53,7 +53,7 @@ module Gitlab
...
@@ -53,7 +53,7 @@ module Gitlab
return
metric
if
metric
return
metric
if
metric
PROVIDER_MUTEX
.
synchronize
do
PROVIDER_MUTEX
.
synchronize
do
provide_metric
(
name
)
||
registry
.
send
(
method
,
name
,
*
args
)
provide_metric
(
name
)
||
registry
.
method
(
method
).
call
(
name
,
*
args
)
end
end
end
end
...
...
lib/gitlab/middleware/rails_queue_duration.rb
View file @
77e938a8
...
@@ -5,6 +5,13 @@
...
@@ -5,6 +5,13 @@
module
Gitlab
module
Gitlab
module
Middleware
module
Middleware
class
RailsQueueDuration
class
RailsQueueDuration
def
self
.
metric_rails_queue_duration_seconds
@metric_rails_queue_duration_seconds
||=
Gitlab
::
Metrics
.
histogram
(
:gitlab_rails_queue_duration_seconds
,
Gitlab
::
Metrics
::
Transaction
::
BASE_LABELS
)
end
def
initialize
(
app
)
def
initialize
(
app
)
@app
=
app
@app
=
app
end
end
...
@@ -21,15 +28,6 @@ module Gitlab
...
@@ -21,15 +28,6 @@ module Gitlab
@app
.
call
(
env
)
@app
.
call
(
env
)
end
end
private
def
self
.
metric_rails_queue_duration_seconds
@metric_rails_queue_duration_seconds
||=
Gitlab
::
Metrics
.
histogram
(
:gitlab_rails_queue_duration_seconds
,
Gitlab
::
Metrics
::
Transaction
::
BASE_LABELS
)
end
end
end
end
end
end
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