Class: ActiveSupport::Testing::Performance::Metrics::Objects

Inherits:
Base
  • Object
show all
Defined in:
lib/gems/activesupport-2.2.2/lib/active_support/testing/performance.rb

Constant Summary collapse

Mode =
RubyProf::ALLOCATIONS

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



405
406
407
# File 'lib/gems/activesupport-2.2.2/lib/active_support/testing/performance.rb', line 405

def format(measurement)
  measurement.to_i.to_s
end

#measureObject

Ruby 1.9 + GC profiler patch



395
396
397
# File 'lib/gems/activesupport-2.2.2/lib/active_support/testing/performance.rb', line 395

def measure
  RubyProf.measure_allocations
end