Class: RailsMemoryProfiler::Configuration
- Inherits:
-
Object
- Object
- RailsMemoryProfiler::Configuration
- Defined in:
- lib/rails_memory_profiler/configuration.rb
Overview
Instance Attribute Summary collapse
-
#dashboard_enabled ⇒ Object
Returns the value of attribute dashboard_enabled.
-
#detailed_reports ⇒ Object
Returns the value of attribute detailed_reports.
-
#detailed_sample_rate ⇒ Object
Returns the value of attribute detailed_sample_rate.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#ignore_controllers ⇒ Object
Returns the value of attribute ignore_controllers.
-
#ignore_paths ⇒ Object
Returns the value of attribute ignore_paths.
-
#log_file ⇒ String?
Path to a file where reports are appended as JSON lines.
-
#min_allocated_objects ⇒ Object
Returns the value of attribute min_allocated_objects.
-
#notifiers ⇒ Object
Returns the value of attribute notifiers.
-
#raise_on_allocation_spike ⇒ Object
Returns the value of attribute raise_on_allocation_spike.
-
#sample_rate ⇒ Object
Returns the value of attribute sample_rate.
-
#store_size ⇒ Object
Returns the value of attribute store_size.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/rails_memory_profiler/configuration.rb', line 72 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_enabled ⇒ Object
Returns the value of attribute dashboard_enabled.
|
|
# File 'lib/rails_memory_profiler/configuration.rb', line 24
|
#detailed_reports ⇒ Object
Returns the value of attribute detailed_reports.
|
|
# File 'lib/rails_memory_profiler/configuration.rb', line 41
|
#detailed_sample_rate ⇒ Object
Returns the value of attribute detailed_sample_rate.
|
|
# File 'lib/rails_memory_profiler/configuration.rb', line 46
|
#enabled ⇒ Object
Returns the value of attribute enabled.
|
|
# File 'lib/rails_memory_profiler/configuration.rb', line 12
|
#ignore_controllers ⇒ Object
Returns the value of attribute ignore_controllers.
|
|
# File 'lib/rails_memory_profiler/configuration.rb', line 37
|
#ignore_paths ⇒ Object
Returns the value of attribute ignore_paths.
|
|
# File 'lib/rails_memory_profiler/configuration.rb', line 32
|
#log_file ⇒ String?
Path to a file where reports are appended as JSON lines. Shortcut for configuring Notifiers::FileLogger manually.
66 67 68 69 70 |
# File 'lib/rails_memory_profiler/configuration.rb', line 66 attr_accessor :enabled, :sample_rate, :store_size, :dashboard_enabled, :min_allocated_objects, :ignore_paths, :ignore_controllers, :detailed_reports, :detailed_sample_rate, :raise_on_allocation_spike, :notifiers, :log_file |
#min_allocated_objects ⇒ Object
Returns the value of attribute min_allocated_objects.
|
|
# File 'lib/rails_memory_profiler/configuration.rb', line 28
|
#notifiers ⇒ Object
Returns the value of attribute notifiers.
|
|
# File 'lib/rails_memory_profiler/configuration.rb', line 55
|
#raise_on_allocation_spike ⇒ Object
Returns the value of attribute raise_on_allocation_spike.
|
|
# File 'lib/rails_memory_profiler/configuration.rb', line 50
|
#sample_rate ⇒ Object
Returns the value of attribute sample_rate.
|
|
# File 'lib/rails_memory_profiler/configuration.rb', line 16
|
#store_size ⇒ Object
Returns the value of attribute store_size.
|
|
# File 'lib/rails_memory_profiler/configuration.rb', line 20
|