Module: Gitlab::Sherlock

Defined in:
lib/gitlab/sherlock.rb,
lib/gitlab/sherlock/query.rb,
lib/gitlab/sherlock/location.rb,
lib/gitlab/sherlock/collection.rb,
lib/gitlab/sherlock/middleware.rb,
lib/gitlab/sherlock/transaction.rb,
lib/gitlab/sherlock/file_sample.rb,
lib/gitlab/sherlock/line_sample.rb,
lib/gitlab/sherlock/line_profiler.rb

Defined Under Namespace

Classes: Collection, FileSample, LineProfiler, LineSample, Location, Middleware, Query, Transaction

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.collectionObject (readonly)

Returns the value of attribute collection


8
9
10
# File 'lib/gitlab/sherlock.rb', line 8

def collection
  @collection
end

Class Method Details

.enable_line_profiler?Boolean


15
16
17
# File 'lib/gitlab/sherlock.rb', line 15

def self.enable_line_profiler?
  RUBY_ENGINE == 'ruby'
end

.enabled?Boolean


11
12
13
# File 'lib/gitlab/sherlock.rb', line 11

def self.enabled?
  Rails.env.development? && !!ENV['ENABLE_SHERLOCK']
end