Added metrics instrumentation for all finders
This commit is contained in:
parent
835f1961e6
commit
8c4210e676
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue