From 9a934e25011baa7b68239ce6fdbe010ab88cf86f Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Wed, 3 Aug 2016 17:08:41 +0200 Subject: [PATCH] Instrument Gitlab::Highlight This class does quite a few interesting things so let's instrument it so we can see how much time is being spent in this class. --- CHANGELOG | 1 + config/initializers/metrics.rb | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 472faa05b75..d5029178fd8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -30,6 +30,7 @@ v 8.11.0 (unreleased) - Include old revision in merge request update hooks (Ben Boeckel) - Add build event color in HipChat messages (David Eisner) - Make fork counter always clickable. !5463 (winniehell) + - Gitlab::Highlight is now instrumented - All created issues, API or WebUI, can be submitted to Akismet for spam check !5333 - The overhead of instrumented method calls has been reduced - Remove `search_id` of labels dropdown filter to fix 'Missleading URI for labels in Merge Requests and Issues view'. !5368 (Scott Le) diff --git a/config/initializers/metrics.rb b/config/initializers/metrics.rb index b68a09ce730..cc8208db3c1 100644 --- a/config/initializers/metrics.rb +++ b/config/initializers/metrics.rb @@ -145,6 +145,9 @@ if Gitlab::Metrics.enabled? config.instrument_methods(Rinku) config.instrument_instance_methods(Repository) + + config.instrument_methods(Gitlab::Highlight) + config.instrument_instance_methods(Gitlab::Highlight) end GC::Profiler.enable