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

Inherits:
Performer
  • Object
show all
Defined in:
lib/rails/perftest/active_support/testing/performance.rb,
lib/rails/perftest/active_support/testing/performance/ruby.rb,
lib/rails/perftest/active_support/testing/performance/jruby.rb,
lib/rails/perftest/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.



27
28
29
30
# File 'lib/rails/perftest/active_support/testing/performance/ruby.rb', line 27

def initialize(*args)
  super
  @supported = @metric.measure_mode rescue false
end

Instance Method Details

#recordObject



126
# File 'lib/rails/perftest/active_support/testing/performance.rb', line 126

def record; end

#runObject



125
# File 'lib/rails/perftest/active_support/testing/performance.rb', line 125

def run;    end

#time_with_blockObject



119
120
121
122
123
# File 'lib/rails/perftest/active_support/testing/performance.rb', line 119

def time_with_block
  before = Time.now
  yield
  Time.now - before
end