Class: Perfer::MeasurementsFormatter
- Inherits:
-
Object
- Object
- Perfer::MeasurementsFormatter
- Includes:
- Formatter
- Defined in:
- lib/perfer/formatter/measurements_formatter.rb
Constant Summary collapse
- SEPARATOR =
' '
Constants included from Formatter
Instance Method Summary collapse
-
#initialize(measurements) ⇒ MeasurementsFormatter
constructor
A new instance of MeasurementsFormatter.
- #report ⇒ Object
Methods included from Formatter
#float_scale, #format_duration, #format_duration_and_error, #format_error, #format_float, #format_ips, #format_n, #format_time, #max_length_of, #ruby_version, #short_ruby_description
Constructor Details
#initialize(measurements) ⇒ MeasurementsFormatter
Returns a new instance of MeasurementsFormatter.
7 8 9 10 11 12 13 |
# File 'lib/perfer/formatter/measurements_formatter.rb', line 7 def initialize(measurements) @measurements = measurements @fields = Perfer::TIMES_FIELDS.dup @fields.reject! { |field| measurements.none? { |m| m.key? field } } end |