Class: Benchmark::Inputs::Report

Inherits:
Object
  • Object
show all
Defined in:
lib/benchmark/inputs.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#labelString (readonly)

The label for the report.

Returns:

  • (String)


211
212
213
# File 'lib/benchmark/inputs.rb', line 211

def label
  @label
end

#ratioFloat? (readonly)

The ratio of iterations per second for this report compared to the fastest report. Will be nil if the difference between the two falls within the combined measurement error.

This value is set by Job#compare!.

Returns:

  • (Float, nil)


220
221
222
# File 'lib/benchmark/inputs.rb', line 220

def ratio
  @ratio
end

Instance Method Details

#ipsFloat

The estimated iterations per second for the report.

Returns:

  • (Float)


249
250
251
# File 'lib/benchmark/inputs.rb', line 249

def ips
  @mean
end

#stddevFloat

The #ips standard deviation.

Returns:

  • (Float)


256
257
258
# File 'lib/benchmark/inputs.rb', line 256

def stddev
  @stddev ||= @n < 2 ? 0.0 : Math.sqrt(@m2 / (@n - 1))
end