Class: RailsMemoryProfiler::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_memory_profiler/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/rails_memory_profiler/configuration.rb', line 9

def initialize
  @enabled               = Rails.env.development?
  @sample_rate           = 1
  @store_size            = 100
  @dashboard_enabled     = Rails.env.development?
  @min_allocated_objects = 0
  @ignore_paths          = []
  @ignore_controllers    = []
  @detailed_reports          = false
  @detailed_sample_rate      = 10
  @raise_on_allocation_spike = nil
  @notifiers                 = []
  @log_file                  = nil
end

Instance Attribute Details

#dashboard_enabledObject

Returns the value of attribute dashboard_enabled.



3
4
5
# File 'lib/rails_memory_profiler/configuration.rb', line 3

def dashboard_enabled
  @dashboard_enabled
end

#detailed_reportsObject

Returns the value of attribute detailed_reports.



3
4
5
# File 'lib/rails_memory_profiler/configuration.rb', line 3

def detailed_reports
  @detailed_reports
end

#detailed_sample_rateObject

Returns the value of attribute detailed_sample_rate.



3
4
5
# File 'lib/rails_memory_profiler/configuration.rb', line 3

def detailed_sample_rate
  @detailed_sample_rate
end

#enabledObject

Returns the value of attribute enabled.



3
4
5
# File 'lib/rails_memory_profiler/configuration.rb', line 3

def enabled
  @enabled
end

#ignore_controllersObject

Returns the value of attribute ignore_controllers.



3
4
5
# File 'lib/rails_memory_profiler/configuration.rb', line 3

def ignore_controllers
  @ignore_controllers
end

#ignore_pathsObject

Returns the value of attribute ignore_paths.



3
4
5
# File 'lib/rails_memory_profiler/configuration.rb', line 3

def ignore_paths
  @ignore_paths
end

#log_fileObject

Returns the value of attribute log_file.



3
4
5
# File 'lib/rails_memory_profiler/configuration.rb', line 3

def log_file
  @log_file
end

#min_allocated_objectsObject

Returns the value of attribute min_allocated_objects.



3
4
5
# File 'lib/rails_memory_profiler/configuration.rb', line 3

def min_allocated_objects
  @min_allocated_objects
end

#notifiersObject

Returns the value of attribute notifiers.



3
4
5
# File 'lib/rails_memory_profiler/configuration.rb', line 3

def notifiers
  @notifiers
end

#raise_on_allocation_spikeObject

Returns the value of attribute raise_on_allocation_spike.



3
4
5
# File 'lib/rails_memory_profiler/configuration.rb', line 3

def raise_on_allocation_spike
  @raise_on_allocation_spike
end

#sample_rateObject

Returns the value of attribute sample_rate.



3
4
5
# File 'lib/rails_memory_profiler/configuration.rb', line 3

def sample_rate
  @sample_rate
end

#store_sizeObject

Returns the value of attribute store_size.



3
4
5
# File 'lib/rails_memory_profiler/configuration.rb', line 3

def store_size
  @store_size
end