gitlab-org--gitlab-foss/lib/gitlab/sherlock.rb
Yorick Peterse 73cf0f1647 Only load rblineprof when actually needed
This ensures the application can still boot when the "development" group
is not available.
2015-11-09 15:54:13 +01:00

19 lines
316 B
Ruby

require 'securerandom'
module Gitlab
module Sherlock
@collection = Collection.new
class << self
attr_reader :collection
end
def self.enabled?
Rails.env.development? && !!ENV['ENABLE_SHERLOCK']
end
def self.enable_line_profiler?
RUBY_ENGINE == 'ruby'
end
end
end