class ActiveSupport::Testing::Performance::Metrics::Base

def benchmark

def benchmark
  with_gc_stats do
    before = measure
    yield
    @total += (measure - before)
  end
end

def initialize

def initialize
  @total = 0
end

def measure

def measure
  0
end

def measure_mode

def measure_mode
  self.class::Mode
end

def name

def name
  @name ||= self.class.name.demodulize.underscore
end

def profile

def profile
  RubyProf.resume
  yield
ensure
  RubyProf.pause
end

def with_gc_stats

def with_gc_stats
  GC::Profiler.enable
  GC.start
  yield
ensure
  GC::Profiler.disable
end

def with_gc_stats

def with_gc_stats
  GC.enable_stats
  yield
ensure
  GC.disable_stats
end

def with_gc_stats

def with_gc_stats
  yield
end