summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/concerns/with_performance_bar.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/concerns/with_performance_bar.rb b/app/controllers/concerns/with_performance_bar.rb
index 4e0ae3c59eb..b19d6eb9439 100644
--- a/app/controllers/concerns/with_performance_bar.rb
+++ b/app/controllers/concerns/with_performance_bar.rb
@@ -3,6 +3,12 @@
module WithPerformanceBar
extend ActiveSupport::Concern
+ included do
+ before_action :peek_enabled? # Warm cache
+ end
+
+ protected
+
def peek_enabled?
return false unless Gitlab::PerformanceBar.enabled?(current_user)