summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2016-01-18 11:54:22 +0100
committerYorick Peterse <yorickpeterse@gmail.com>2016-01-18 11:54:22 +0100
commit8c4210e676c3c02b4dd506988dba090faa6f9ca3 (patch)
treeb44be5362166be7d43889ab83e87f70b9723485f /config
parent835f1961e65fe9b4f943b17747b1518c555e8bfd (diff)
downloadgitlab-ce-8c4210e676c3c02b4dd506988dba090faa6f9ca3.tar.gz
Added metrics instrumentation for all findersinstrument-finders
Diffstat (limited to 'config')
-rw-r--r--config/initializers/metrics.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/config/initializers/metrics.rb b/config/initializers/metrics.rb
index 52ace27b7ae..b1fe36dc21c 100644
--- a/config/initializers/metrics.rb
+++ b/config/initializers/metrics.rb
@@ -55,6 +55,12 @@ if Gitlab::Metrics.enabled?
config.instrument_methods(const) if const.is_a?(Module)
end
+
+ Dir[Rails.root.join('app', 'finders', '*.rb')].each do |path|
+ const = File.basename(path, '.rb').camelize.constantize
+
+ config.instrument_instance_methods(const)
+ end
end
GC::Profiler.enable