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/file_sample.rb,
lib/gitlab/sherlock/line_sample.rb,
lib/gitlab/sherlock/transaction.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


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

def collection
  @collection
end

Class Method Details

.enable_line_profiler?Boolean

Returns:

  • (Boolean)

17
18
19
# File 'lib/gitlab/sherlock.rb', line 17

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

.enabled?Boolean

Returns:

  • (Boolean)

13
14
15
# File 'lib/gitlab/sherlock.rb', line 13

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