Methods
F
R
Included Modules
Classes and Modules
Constants
DEFAULTS = if ARGV.include?('--benchmark') # HAX for rake test { :runs => 4, :output => 'tmp/performance', :benchmark => true } else { :runs => 1, :output => 'tmp/performance', :benchmark => false } end
 

each implementation should define metrics and freeze the defaults

Instance Public methods
full_profile_options()
# File activesupport/lib/active_support/testing/performance.rb, line 36
def full_profile_options
  DEFAULTS.merge(profile_options)
end
full_test_name()
# File activesupport/lib/active_support/testing/performance.rb, line 40
def full_test_name
  "#{self.class.name}##{method_name}"
end
Instance Protected methods
run_gc()

overridden by each implementation

# File activesupport/lib/active_support/testing/performance.rb, line 124
def run_gc; end
run_profile(metric)
# File activesupport/lib/active_support/testing/performance.rb, line 136
def run_profile(metric)
  klass = full_profile_options[:benchmark] ? Benchmarker : Profiler
  performer = klass.new(self, metric)

  performer.run
  puts performer.report
  performer.record
end
run_warmup()
# File activesupport/lib/active_support/testing/performance.rb, line 126
def run_warmup
  run_gc

  time = Metrics::Time.new
  run_test(time, :benchmark)
  puts "%s (%s warmup)" % [full_test_name, time.format(time.total)]

  run_gc
end