Included Modules

Class Index [+]

Quicksearch

ActiveSupport::Testing::Performance

Constants

DEFAULTS

each implementation should define metrics and freeze the defaults

Public Instance Methods

full_profile_options() click to toggle source
    # File lib/active_support/testing/performance.rb, line 36
36:       def full_profile_options
37:         DEFAULTS.merge(profile_options)
38:       end
full_test_name() click to toggle source
    # File lib/active_support/testing/performance.rb, line 40
40:       def full_test_name
41:         "#{self.class.name}##{method_name}"
42:       end

Protected Instance Methods

run_gc() click to toggle source
    # File lib/active_support/testing/performance/jruby.rb, line 17
17:         def run_gc
18:           ManagementFactory.memory_mx_bean.gc
19:         end
run_gc() click to toggle source
    # File lib/active_support/testing/performance/rubinius.rb, line 15
15:         def run_gc
16:           GC.run(true)
17:         end
run_gc() click to toggle source
    # File lib/active_support/testing/performance/ruby.rb, line 21
21:         def run_gc
22:           GC.start
23:         end
run_gc() click to toggle source

overridden by each implementation

     # File lib/active_support/testing/performance.rb, line 124
124:         def run_gc; end
run_profile(metric) click to toggle source
     # File 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() click to toggle source
     # File 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

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.