Instrument Gitlab::Shel and Gitlab::Git

This commit is contained in:
Yorick Peterse 2015-12-10 17:09:20 +01:00
parent 641761f1d6
commit 6dc25ad58c
1 changed files with 12 additions and 0 deletions

View File

@ -18,6 +18,18 @@ if Gitlab::Metrics.enabled?
end
end
Gitlab::Metrics::Instrumentation.configure do |config|
config.instrument_instance_methods(Gitlab::Shell)
config.instrument_methods(Gitlab::Git)
Gitlab::Git.constants.each do |name|
const = Gitlab::Git.const_get(name)
config.instrument_methods(const) if const.is_a?(Module)
end
end
GC::Profiler.enable
Gitlab::Metrics::Sampler.new.start