Module: Oink

Defined in:
lib/oink/cli.rb,
lib/oink/middleware.rb,
lib/oink/reports/base.rb,
lib/oink/reports/request.rb,
lib/oink/utils/hash_utils.rb,
lib/oink/reports/priority_queue.rb,
lib/oink/rails/memory_usage_logger.rb,
lib/oink/rails/instance_type_counter.rb,
lib/oink/reports/memory_usage_report.rb,
lib/oink/instrumentation/active_record.rb,
lib/oink/reports/memory_oinked_request.rb,
lib/oink/instrumentation/memory_snapshot.rb,
lib/oink/reports/active_record_instantiation_report.rb,
lib/oink/reports/active_record_instantiation_oinked_request.rb

Defined Under Namespace

Modules: HashUtils, InstanceTypeCounter, Instrumentation, MemoryUsageLogger, Reports Classes: Cli, Middleware

Class Method Summary collapse

Class Method Details

.extend_active_record!Object



11
12
13
14
15
# File 'lib/oink/instrumentation/active_record.rb', line 11

def self.extend_active_record!
  ::ActiveRecord::Base.class_eval do
    include Instrumentation::ActiveRecord
  end
end

.extended_active_record!Object



7
8
9
# File 'lib/oink/instrumentation/active_record.rb', line 7

def self.extended_active_record!
  @oink_extended_active_record = true
end

.extended_active_record?Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/oink/instrumentation/active_record.rb', line 3

def self.extended_active_record?
  @oink_extended_active_record
end