| Class | ActiveSupport::Testing::Metrics::Memory |
| In: |
vendor/rails/activesupport/lib/active_support/testing/performance.rb
|
| Parent: | Base |
| Mode | = | RubyProf::MEMORY if RubyProf.const_defined?(:MEMORY) |
# File vendor/rails/activesupport/lib/active_support/testing/performance.rb, line 374
374: def format(measurement)
375: '%.2f KB' % measurement
376: end
# File vendor/rails/activesupport/lib/active_support/testing/performance.rb, line 353
353: def measure
354: GC.total_malloc_allocated_size / 1024.0
355: end
# File vendor/rails/activesupport/lib/active_support/testing/performance.rb, line 347
347: def measure
348: GC.heap_info['heap_current_memory'] / 1024.0
349: end
# File vendor/rails/activesupport/lib/active_support/testing/performance.rb, line 341
341: def measure
342: GC.allocated_size / 1024.0
343: end
# File vendor/rails/activesupport/lib/active_support/testing/performance.rb, line 359
359: def measure
360: GC.malloc_allocated_size / 1024.0
361: end