提交 e9a4d117 编写于 作者: P Paco Guzman

Instrument cache fetch hit and cache fetch misses

上级 c85092ac
......@@ -21,6 +21,18 @@ module Gitlab
increment(:cache_exists, event.duration)
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)
return unless current_transaction
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册