class Bench::Measurements

Public Class Methods

new() click to toggle source
# File lib/bench9000/measurement.rb, line 47
def initialize
  @hash = {}
end

Public Instance Methods

[](b, i) click to toggle source
# File lib/bench9000/measurement.rb, line 55
def [](b, i)
  @hash[[b, i]]
end
[]=(b, i, m) click to toggle source
# File lib/bench9000/measurement.rb, line 51
def []=(b, i, m)
  @hash[[b, i]] = m
end
measurements() click to toggle source
# File lib/bench9000/measurement.rb, line 59
def measurements
  @hash
end
total_time() click to toggle source
# File lib/bench9000/measurement.rb, line 63
def total_time
  Stats.sum(measurements.values.map { |m|
    if m == :failed
      0
    else
      m.total_time
    end
  })
end