class Benchmark::Memory::Job::IOOutput::EntryFormatter

Format entries for use with the IOOutput.

def initialize(entry)

Parameters:
  • entry (Entry) -- The entry to format.
def initialize(entry)
  @entry = entry
end

def to_s

Returns:
  • (String) -
def to_s
  output = StringIO.new
  output << rjust(entry.label)
  first, *rest = *entry.measurement
  output << "#{MetricFormatter.new(first)}\n"
  rest.each do |metric|
    output << "#{' ' * 20}#{MetricFormatter.new(metric)}\n"
  end
  output.string
end