Class: ActiveSupport::Testing::Performance::Profiler
- Defined in:
- lib/active_support/testing/performance.rb,
lib/active_support/testing/performance/ruby.rb,
lib/active_support/testing/performance/jruby.rb,
lib/active_support/testing/performance/rubinius.rb
Overview
overridden by each implementation
Instance Method Summary collapse
-
#initialize(*args) ⇒ Profiler
constructor
A new instance of Profiler.
- #record ⇒ Object
- #run ⇒ Object
- #time_with_block ⇒ Object
Methods inherited from Performer
Constructor Details
#initialize(*args) ⇒ Profiler
Returns a new instance of Profiler.
26 27 28 29 |
# File 'lib/active_support/testing/performance/ruby.rb', line 26 def initialize(*args) super @supported = @metric.measure_mode rescue false end |
Instance Method Details
#record ⇒ Object
176 |
# File 'lib/active_support/testing/performance.rb', line 176 def record; end |
#run ⇒ Object
175 |
# File 'lib/active_support/testing/performance.rb', line 175 def run; end |
#time_with_block ⇒ Object
169 170 171 172 173 |
# File 'lib/active_support/testing/performance.rb', line 169 def time_with_block before = Time.now yield Time.now - before end |