Class: Benchmark::Inputs::Report
- Inherits:
-
Object
- Object
- Benchmark::Inputs::Report
- Defined in:
- lib/benchmark/inputs.rb
Instance Attribute Summary collapse
-
#label ⇒ String
readonly
The label for the report.
-
#ratio ⇒ Float?
readonly
The ratio of the speed from the fastest report compared to the speed from this report.
Instance Method Summary collapse
-
#ips ⇒ Float
The estimated speed for the report, in invocations per second.
-
#stddev ⇒ Float
The standard deviation of the estimated speed for the report.
Instance Attribute Details
#label ⇒ String (readonly)
The label for the report.
185 186 187 |
# File 'lib/benchmark/inputs.rb', line 185 def label @label end |
#ratio ⇒ Float? (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!.
196 197 198 |
# File 'lib/benchmark/inputs.rb', line 196 def ratio @ratio end |
Instance Method Details
#ips ⇒ Float
The estimated speed for the report, in invocations per second.
225 226 227 |
# File 'lib/benchmark/inputs.rb', line 225 def ips @mean end |
#stddev ⇒ Float
The standard deviation of the estimated speed for the report.
232 233 234 |
# File 'lib/benchmark/inputs.rb', line 232 def stddev @stddev ||= @n < 2 ? 0.0 : Math.sqrt(@m2 / (@n - 1)) end |