class Benchmark::Memory::Job::IOOutput
Output the results of jobs into an IO.
Public Class Methods
new(io)
click to toggle source
Instantiate a new output that writes to an IO.
@param io [#puts] The IO to write on.
# File lib/benchmark/memory/job/io_output.rb, line 12 def initialize(io) @io = io end
Public Instance Methods
put_comparison(comparison)
click to toggle source
Put the comparison onto the output.
@return [void]
# File lib/benchmark/memory/job/io_output.rb, line 26 def put_comparison(comparison) @io.puts @io.puts "Comparison:" @io.puts ComparisonFormatter.new(comparison) end
put_entry(entry)
click to toggle source
Put the entry onto the output.
@return [void]
# File lib/benchmark/memory/job/io_output.rb, line 19 def put_entry(entry) @io.puts EntryFormatter.new(entry) end
put_header()
click to toggle source
Put the header onto the output.
@return [void]
# File lib/benchmark/memory/job/io_output.rb, line 35 def put_header @io.puts "Calculating -------------------------------------" end
put_hold_notice()
click to toggle source
Put a notice that the execution is holding for another run.
@return [void]
# File lib/benchmark/memory/job/io_output.rb, line 42 def put_hold_notice @io.puts @io.puts "Pausing here -- run Ruby again to " \ "measure the next benchmark..." end