class Benchmark::Memory::Job::IOOutput::MetricFormatter
Format metrics for use with the IOOutput.
def allocated_message
-
(String)- the formated string for allocated memory
def allocated_message format( '%<allocated>s %<type>s', allocated: scale(metric.allocated), type: metric.type ) end
def initialize(metric)
-
metric(Measurement::Metric) -- The metric to format.
def initialize(metric) @metric = metric end
def retained_message
-
(String)- the formated string for retained memory
def retained_message format( '(%<retained>s retained)', retained: scale(metric.retained) ) end
def to_s
-
(String)-
def to_s [allocated_message, retained_message].join(' ') end