summaryrefslogtreecommitdiff
path: root/lib/gitlab/performance_bar.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-05-17 13:20:55 +0200
committerRémy Coutable <remy@rymai.me>2017-06-09 17:21:39 +0200
commitd39ecf1ca7e9455abcdeb17c251a2d248a47d471 (patch)
tree51c448694d2e5a29083555a1d78b34f17fd57ef7 /lib/gitlab/performance_bar.rb
parent320590180703c620cedd6eb6023548dca2d026cf (diff)
downloadgitlab-ce-d39ecf1ca7e9455abcdeb17c251a2d248a47d471.tar.gz
New performance bar that can be enabled with the `p b` shortcut
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/gitlab/performance_bar.rb')
-rw-r--r--lib/gitlab/performance_bar.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/gitlab/performance_bar.rb b/lib/gitlab/performance_bar.rb
new file mode 100644
index 00000000000..3324fec94d4
--- /dev/null
+++ b/lib/gitlab/performance_bar.rb
@@ -0,0 +1,7 @@
+module Gitlab
+ module PerformanceBar
+ def self.enabled?
+ ENV["PERFORMANCE_BAR"] == '1'
+ end
+ end
+end