Class: Benchmark::Memory::Job::IOOutput::MetricFormatter
- Inherits:
-
Object
- Object
- Benchmark::Memory::Job::IOOutput::MetricFormatter
- Includes:
- Helpers
- Defined in:
- lib/benchmark/memory/job/io_output/metric_formatter.rb
Overview
Format metrics for use with the IOOutput.
Instance Attribute Summary collapse
-
#metric ⇒ Metric
readonly
The metric to format.
Instance Method Summary collapse
-
#initialize(metric) ⇒ MetricFormatter
constructor
Instantiate a formatter to output a metric into an IO.
-
#to_s ⇒ String
Format metric to a string to put on the output.
Methods included from Helpers
Constructor Details
#initialize(metric) ⇒ MetricFormatter
Instantiate a formatter to output a metric into an IO.
16 17 18 |
# File 'lib/benchmark/memory/job/io_output/metric_formatter.rb', line 16 def initialize(metric) @metric = metric end |
Instance Attribute Details
#metric ⇒ Metric (readonly)
Returns The metric to format.
21 22 23 |
# File 'lib/benchmark/memory/job/io_output/metric_formatter.rb', line 21 def metric @metric end |
Instance Method Details
#to_s ⇒ String
Format metric to a string to put on the output.
26 27 28 |
# File 'lib/benchmark/memory/job/io_output/metric_formatter.rb', line 26 def to_s [, ].join(' ') end |