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

Attributes

loopback[R]
total[R]

Public Class Methods

new() click to toggle source
# File lib/rails/perftest/active_support/testing/performance.rb, line 234
def initialize
  @total = 0
end

Public Instance Methods

benchmark() { || ... } click to toggle source
# File lib/rails/perftest/active_support/testing/performance.rb, line 242
def benchmark
  with_gc_stats do
    before = measure
    yield
    @total += (measure - before)
  end
end
measure_mode() click to toggle source
# File lib/rails/perftest/active_support/testing/performance/ruby.rb, line 80
def measure_mode
  self.class::Mode
end
name() click to toggle source
# File lib/rails/perftest/active_support/testing/performance.rb, line 238
def name
  @name ||= self.class.name.demodulize.underscore
end
profile() click to toggle source

overridden by each implementation.

# File lib/rails/perftest/active_support/testing/performance.rb, line 251
def profile; end

Protected Instance Methods

with_gc_stats() click to toggle source

overridden by each implementation.

# File lib/rails/perftest/active_support/testing/performance.rb, line 255
def with_gc_stats; end