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)


185
186
187
# File 'lib/benchmark/inputs.rb', line 185

def label
  @label
end

#ratioFloat? (readonly)

The ratio of the speed from the fastest report compared to the speed from this report. In other words, the “slower than fastest by” multiplier for this report. Will be nil if the absolute difference in speed between the two reports falls within the combined measurement error.

This value is set by Job#compare!.

Returns:

  • (Float, nil)


196
197
198
# File 'lib/benchmark/inputs.rb', line 196

def ratio
  @ratio
end

Instance Method Details

#ipsFloat

The estimated speed for the report, in invocations per second.

Returns:

  • (Float)


225
226
227
# File 'lib/benchmark/inputs.rb', line 225

def ips
  @mean
end

#stddevFloat

The standard deviation of the estimated speed for the report.

Returns:

  • (Float)


232
233
234
# File 'lib/benchmark/inputs.rb', line 232

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