Class | ActiveSupport::Testing::Metrics::Objects |
In: |
vendor/rails/activesupport/lib/active_support/testing/performance.rb
|
Parent: | Base |
Mode | = | RubyProf::ALLOCATIONS if RubyProf.const_defined?(:ALLOCATIONS) |
# File vendor/rails/activesupport/lib/active_support/testing/performance.rb, line 405 405: def format(measurement) 406: measurement.to_i.to_s 407: end
# File vendor/rails/activesupport/lib/active_support/testing/performance.rb, line 395 395: def measure 396: GC.enable 397: GC.start 398: last = GC::Profiler.data.last 399: count = last[:HEAP_LIVE_OBJECTS] + last[:HEAP_FREE_OBJECTS] 400: GC.disable 401: count 402: end