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
36:       def full_profile_options
37:         DEFAULTS.merge(profile_options)
38:       end
full_test_name()
    # File activesupport/lib/active_support/testing/performance.rb, line 40
40:       def full_test_name
41:         "#{self.class.name}##{method_name}"
42:       end
Instance Protected methods
run_gc()
    # File activesupport/lib/active_support/testing/performance/ruby.rb, line 21
21:         def run_gc
22:           GC.start
23:         end
run_gc()
    # File activesupport/lib/active_support/testing/performance/jruby.rb, line 17
17:         def run_gc
18:           ManagementFactory.memory_mx_bean.gc
19:         end
run_gc()
    # File activesupport/lib/active_support/testing/performance/rubinius.rb, line 15
15:         def run_gc
16:           GC.run(true)
17:         end
run_gc()

overridden by each implementation

     # File activesupport/lib/active_support/testing/performance.rb, line 124
124:         def run_gc; end
run_profile(metric)
     # File activesupport/lib/active_support/testing/performance.rb, line 136
136:         def run_profile(metric)
137:           klass = full_profile_options[:benchmark] ? Benchmarker : Profiler
138:           performer = klass.new(self, metric)
139: 
140:           performer.run
141:           puts performer.report
142:           performer.record
143:         end
run_warmup()
     # File activesupport/lib/active_support/testing/performance.rb, line 126
126:         def run_warmup
127:           run_gc
128: 
129:           time = Metrics::Time.new
130:           run_test(time, :benchmark)
131:           puts "%s (%s warmup)" % [full_test_name, time.format(time.total)]
132: 
133:           run_gc
134:         end