# File lib/active_support/testing/performance.rb, line 253 def initialize @total = 0 end
# File lib/active_support/testing/performance.rb, line 261 def benchmark with_gc_stats do before = measure yield @total += (measure - before) end end
# File lib/active_support/testing/performance/ruby.rb, line 77 def measure_mode self.class::Mode end
# File lib/active_support/testing/performance.rb, line 257 def name @name ||= self.class.name.demodulize.underscore end
# File lib/active_support/testing/performance/ruby.rb, line 81 def profile RubyProf.resume yield ensure RubyProf.pause end
overridden by each implementation
# File lib/active_support/testing/performance/ruby.rb, line 90 def with_gc_stats yield end