Class: ActiveSupport::Testing::Performance::Profiler

Inherits:
Performer show all
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

Overview

overridden by each implementation

Instance Method Summary collapse

Methods inherited from Performer

#report

Constructor Details

#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

#recordObject



176
# File 'activesupport/lib/active_support/testing/performance.rb', line 176

def record; end

#runObject



175
# File 'activesupport/lib/active_support/testing/performance.rb', line 175

def run;    end

#time_with_blockObject



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