Added metrics instrumentation for all finders

This commit is contained in:
Yorick Peterse 2016-01-18 11:54:22 +01:00
parent 835f1961e6
commit 8c4210e676

View file

@ -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