summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2015-12-10 17:09:20 +0100
committerYorick Peterse <yorickpeterse@gmail.com>2015-12-17 17:25:48 +0100
commit6dc25ad58c7bf2218cdda6d60061111a5365affb (patch)
tree5b18e1d3b09dfe3481d086eee38bd3d8c5a32604 /config
parent641761f1d6af5a94c0007e8d7463ee86fc047229 (diff)
downloadgitlab-ce-6dc25ad58c7bf2218cdda6d60061111a5365affb.tar.gz
Instrument Gitlab::Shel and Gitlab::Git
Diffstat (limited to 'config')
-rw-r--r--config/initializers/metrics.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/config/initializers/metrics.rb b/config/initializers/metrics.rb
index 556e968137e..0ac4299dcba 100644
--- a/config/initializers/metrics.rb
+++ b/config/initializers/metrics.rb
@@ -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