Class: Benchmark::IPS::Job::StdoutReport

Inherits:
Object
  • Object
show all
Defined in:
lib/benchmark/ips/job/stdout_report.rb

Instance Method Summary collapse

Instance Method Details

#add_report(item, caller) ⇒ Object



25
26
27
# File 'lib/benchmark/ips/job/stdout_report.rb', line 25

def add_report(item, caller)
  $stdout.puts " #{item.body}"
end

#start_warmingObject Also known as: start_running



5
6
7
# File 'lib/benchmark/ips/job/stdout_report.rb', line 5

def start_warming
  $stdout.puts "Calculating -------------------------------------"
end

#warming(label, _warmup) ⇒ Object Also known as: running



9
10
11
# File 'lib/benchmark/ips/job/stdout_report.rb', line 9

def warming(label, _warmup)
  $stdout.print rjust(label)
end

#warmup_stats(_warmup_time_us, timing) ⇒ Object



13
14
15
16
17
18
19
20
# File 'lib/benchmark/ips/job/stdout_report.rb', line 13

def warmup_stats(_warmup_time_us, timing)
  case format
  when :human
    $stdout.printf "%s i/100ms\n", Helpers.scale(timing)
  else
    $stdout.printf "%10d i/100ms\n", timing
  end
end