Parent

Included Modules

Class Index [+]

Quicksearch

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

Attributes

loopback[R]
total[R]

Public Class Methods

new() click to toggle source
     # File lib/active_support/testing/performance.rb, line 253
253:           def initialize
254:             @total = 0
255:           end

Public Instance Methods

benchmark() click to toggle source
     # File lib/active_support/testing/performance.rb, line 261
261:           def benchmark            
262:             with_gc_stats do
263:               before = measure
264:               yield
265:               @total += (measure - before)
266:             end
267:           end
measure_mode() click to toggle source
    # File lib/active_support/testing/performance/ruby.rb, line 77
77:           def measure_mode
78:             self.class::Mode
79:           end
name() click to toggle source
     # File lib/active_support/testing/performance.rb, line 257
257:           def name
258:             @name ||= self.class.name.demodulize.underscore
259:           end
profile() click to toggle source

overridden by each implementation

     # File lib/active_support/testing/performance.rb, line 270
270:           def profile; end
profile() click to toggle source
    # File lib/active_support/testing/performance/rubinius.rb, line 69
69:           def profile
70:             yield
71:           end
profile() click to toggle source
    # File lib/active_support/testing/performance/jruby.rb, line 66
66:           def profile
67:             yield
68:           end
profile() click to toggle source
    # File lib/active_support/testing/performance/ruby.rb, line 81
81:           def profile
82:             RubyProf.resume
83:             yield
84:           ensure
85:             RubyProf.pause
86:           end

Protected Instance Methods

with_gc_stats() click to toggle source

overridden by each implementation

    # File lib/active_support/testing/performance/ruby.rb, line 90
90:             def with_gc_stats
91:               yield
92:             end
with_gc_stats() click to toggle source
    # File lib/active_support/testing/performance/ruby/yarv.rb, line 9
 9:               def with_gc_stats
10:                 GC::Profiler.enable
11:                 GC.start
12:                 yield
13:               ensure
14:                 GC::Profiler.disable
15:               end
with_gc_stats() click to toggle source
    # File lib/active_support/testing/performance/ruby/mri.rb, line 9
 9:               def with_gc_stats
10:                 GC.enable_stats
11:                 GC.start
12:                 yield
13:               ensure
14:                 GC.disable_stats
15:               end
with_gc_stats() click to toggle source
    # File lib/active_support/testing/performance/rubinius.rb, line 74
74:             def with_gc_stats
75:               @loopback = Rubinius::Agent.loopback
76:               GC.run(true)
77:               yield
78:             end
with_gc_stats() click to toggle source
    # File lib/active_support/testing/performance/jruby.rb, line 71
71:             def with_gc_stats
72:               ManagementFactory.memory_mx_bean.gc
73:               yield
74:             end
with_gc_stats() click to toggle source

overridden by each implementation

     # File lib/active_support/testing/performance.rb, line 274
274:             def with_gc_stats; end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.