Source: show | on GitHub
# File activesupport/lib/active_support/testing/performance/ruby/yarv.rb, line 49 49: def measure 50: GC::Profiler.total_time 51: end
# File activesupport/lib/active_support/testing/performance/ruby/mri.rb, line 49 49: def measure 50: RubyProf.measure_gc_time / 1000.0 / 1000.0 51: end
# File activesupport/lib/active_support/testing/performance/jruby.rb, line 108 108: def measure 109: ManagementFactory.garbage_collector_mx_beans.inject(0) { |total_time, current_gc| total_time += current_gc.collection_time } / 1000.0 # seconds 110: end
# File activesupport/lib/active_support/testing/performance/rubinius.rb, line 106 106: def measure 107: (loopback.get("system.gc.full.wallclock").last + loopback.get("system.gc.young.wallclock").last) / 1000.0 108: end