Commit e9a4d117 authored by Paco Guzman's avatar Paco Guzman

Instrument cache fetch hit and cache fetch misses

parent c85092ac
...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment