summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPawel Chojnacki <pawel@chojnacki.ws>2018-01-22 20:55:48 +0100
committerPawel Chojnacki <pawel@chojnacki.ws>2018-01-29 15:13:05 +0100
commit098cf7d257b5767625ed052b2f442cb216261daa (patch)
tree8da13e451ab406aff39e71dd7294e13ef84909a9
parent2b5a639d794f42156c224ccef50910c4cf44b791 (diff)
downloadgitlab-ce-098cf7d257b5767625ed052b2f442cb216261daa.tar.gz
add comment aabout hotspots
-rw-r--r--lib/gitlab/metrics/concern.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/gitlab/metrics/concern.rb b/lib/gitlab/metrics/concern.rb
index 924b53a615e..35119611a65 100644
--- a/lib/gitlab/metrics/concern.rb
+++ b/lib/gitlab/metrics/concern.rb
@@ -23,6 +23,7 @@ module Gitlab
end
define_singleton_method(name) do
+ # inlining fetch_metric method to avoid method call overhead when instrumenting hot spots
@@_metrics_provider_cache[name] || init_metric(type, name, opts, &block)
end
end