class Benchmark::IPS::Stats::SD

def central_tendency

Returns:
  • (Float) - central_tendency
def central_tendency
  @mean
end

def footer

def footer
  nil
end

def initialize(samples)

def initialize(samples)
  @samples = samples
  @mean = Timing.mean(samples)
  @error = Timing.stddev(samples, @mean).round
end

def slowdown(baseline)

Parameters:
  • baseline (SD|Bootstrap) -- faster baseline
def slowdown(baseline)
  if baseline.central_tendency > central_tendency
    [baseline.central_tendency.to_f / central_tendency, nil]
  else
    [central_tendency.to_f / baseline.central_tendency, nil]
  end
end

def speedup(baseline)

def speedup(baseline)
  baseline.slowdown(self)
end