diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2016-01-18 11:54:22 +0100 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2016-01-18 11:54:22 +0100 |
commit | 8c4210e676c3c02b4dd506988dba090faa6f9ca3 (patch) | |
tree | b44be5362166be7d43889ab83e87f70b9723485f /config | |
parent | 835f1961e65fe9b4f943b17747b1518c555e8bfd (diff) | |
download | gitlab-ce-8c4210e676c3c02b4dd506988dba090faa6f9ca3.tar.gz |
Added metrics instrumentation for all findersinstrument-finders
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/metrics.rb | 6 |
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 |