Class: ActiveSupport::Testing::Performance::Metrics::Memory

Inherits:
Base
  • Object
show all
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

#total

Instance Method Summary collapse

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

#measureObject

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