Class: ActiveSupport::Testing::Performance::Profiler
- Defined in:
- activesupport/lib/active_support/testing/performance.rb,
activesupport/lib/active_support/testing/performance/ruby.rb,
activesupport/lib/active_support/testing/performance/jruby.rb,
activesupport/lib/active_support/testing/performance/rubinius.rb more...
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
permalink #initialize(*args) ⇒ Profiler
Returns a new instance of Profiler.
26 27 28 29 |
# File 'activesupport/lib/active_support/testing/performance/ruby.rb', line 26 def initialize(*args) super @supported = @metric.measure_mode rescue false end |
Instance Method Details
permalink #record ⇒ Object
[View source]
176 |
# File 'activesupport/lib/active_support/testing/performance.rb', line 176 def record; end |
permalink #run ⇒ Object
[View source]
175 |
# File 'activesupport/lib/active_support/testing/performance.rb', line 175 def run; end |
permalink #time_with_block ⇒ Object
[View source]
169 170 171 172 173 |
# File 'activesupport/lib/active_support/testing/performance.rb', line 169 def time_with_block before = Time.now yield Time.now - before end |