Class: ActiveSupport::Testing::Performance::Metrics::Memory
- Defined in:
- lib/gems/activesupport-2.2.2/lib/active_support/testing/performance.rb
Constant Summary collapse
- Mode =
RubyProf::MEMORY
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #format(measurement) ⇒ Object
-
#measure ⇒ Object
Ruby 1.9 + GC profiler patch.
Methods inherited from Base
#benchmark, #initialize, #measure_mode, #name, #profile
Constructor Details
This class inherits a constructor from ActiveSupport::Testing::Performance::Metrics::Base
Instance Method Details
#format(measurement) ⇒ Object
374 375 376 |
# File 'lib/gems/activesupport-2.2.2/lib/active_support/testing/performance.rb', line 374 def format(measurement) '%.2f KB' % measurement end |
#measure ⇒ Object
Ruby 1.9 + GC profiler patch
365 366 367 |
# File 'lib/gems/activesupport-2.2.2/lib/active_support/testing/performance.rb', line 365 def measure RubyProf.measure_memory / 1024.0 end |