class NoSE::Measurements::Measurement
A measurement of a single statement execution time
Attributes
estimate[RW]
name[R]
plan[R]
weight[R]
Public Class Methods
new(plan, name = nil, estimate = nil, weight: 1.0)
click to toggle source
# File lib/nose_cli/measurements.rb, line 21 def initialize(plan, name = nil, estimate = nil, weight: 1.0) @plan = plan @name = name || (plan && plan.name) @estimate = estimate @weight = weight @values = [] end
Public Instance Methods
weighted_mean()
click to toggle source
The mean weighted by this measurement weight @return [Fixnum]
# File lib/nose_cli/measurements.rb, line 31 def weighted_mean @weight * mean end