Module: RailsMemoryProfiler
- Defined in:
- lib/rails_memory_profiler.rb,
lib/rails_memory_profiler/engine.rb,
lib/rails_memory_profiler/version.rb,
lib/rails_memory_profiler/notifiers.rb,
lib/rails_memory_profiler/middleware.rb,
lib/rails_memory_profiler/test_helper.rb,
lib/rails_memory_profiler/report_store.rb,
lib/rails_memory_profiler/configuration.rb,
lib/rails_memory_profiler/notifiers/logger.rb,
lib/rails_memory_profiler/notifiers/stdout.rb,
lib/rails_memory_profiler/minitest_matchers.rb,
lib/rails_memory_profiler/notifiers/console.rb,
lib/rails_memory_profiler/notifiers/file_logger.rb,
app/helpers/rails_memory_profiler/application_helper.rb,
app/controllers/rails_memory_profiler/base_controller.rb,
app/controllers/rails_memory_profiler/store_controller.rb,
app/controllers/rails_memory_profiler/reports_controller.rb,
app/controllers/rails_memory_profiler/comparisons_controller.rb,
lib/generators/rails_memory_profiler/install/install_generator.rb
Overview
RailsMemoryProfiler is a Rails engine that captures per-request object allocations via GC.stat diffs and serves them through a mountable dashboard.
Defined Under Namespace
Modules: ApplicationHelper, Generators, MinitestMatchers, Notifiers, ReportStore, TestHelper Classes: AllocationSpikeError, BaseController, ComparisonsController, Configuration, Engine, Middleware, ReportsController, StoreController
Constant Summary collapse
- VERSION =
"1.0.0"
Class Method Summary collapse
-
.config ⇒ Configuration
Returns the shared Configuration instance, creating it on first call.
-
.configure {|config| ... } ⇒ void
Yields the Configuration instance for block-style setup.
-
.deprecator ⇒ ActiveSupport::Deprecation
Returns a memoized
ActiveSupport::Deprecationinstance scoped to this gem. -
.reset_config! ⇒ Configuration
Replaces the shared Configuration instance with a fresh default.
Class Method Details
.config ⇒ Configuration
Returns the shared Configuration instance, creating it on first call.
37 38 39 |
# File 'lib/rails_memory_profiler.rb', line 37 def config @config ||= Configuration.new end |
.configure {|config| ... } ⇒ void
This method returns an undefined value.
Yields the Configuration instance for block-style setup.
30 31 32 |
# File 'lib/rails_memory_profiler.rb', line 30 def configure yield config end |
.deprecator ⇒ ActiveSupport::Deprecation
Returns a memoized ActiveSupport::Deprecation instance scoped to this gem. Use it to emit deprecation warnings for any future breaking changes rather than calling warn directly.
54 55 56 |
# File 'lib/rails_memory_profiler.rb', line 54 def deprecator @deprecator ||= ActiveSupport::Deprecation.new("1.0.0", "RailsMemoryProfiler") end |
.reset_config! ⇒ Configuration
Replaces the shared Configuration instance with a fresh default. Primarily used in tests.
45 46 47 |
# File 'lib/rails_memory_profiler.rb', line 45 def reset_config! @config = Configuration.new end |