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
iv
gitlab-ce
Commits
e9a4d117
Commit
e9a4d117
authored
Jun 29, 2016
by
Paco Guzman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Instrument cache fetch hit and cache fetch misses
parent
c85092ac
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
lib/gitlab/metrics/subscribers/rails_cache.rb
lib/gitlab/metrics/subscribers/rails_cache.rb
+12
-0
No files found.
lib/gitlab/metrics/subscribers/rails_cache.rb
View file @
e9a4d117
...
@@ -21,6 +21,18 @@ module Gitlab
...
@@ -21,6 +21,18 @@ module Gitlab
increment
(
:cache_exists
,
event
.
duration
)
increment
(
:cache_exists
,
event
.
duration
)
end
end
def
cache_fetch_hit
(
event
)
return
unless
current_transaction
current_transaction
.
increment
(
:cache_fetch_hit
,
1
)
end
def
cache_generate
(
event
)
return
unless
current_transaction
current_transaction
.
increment
(
:cache_fetch_miss
,
1
)
end
def
increment
(
key
,
duration
)
def
increment
(
key
,
duration
)
return
unless
current_transaction
return
unless
current_transaction
...
...
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