Class: Benchmark::IPS::Job::StdoutReport
- Inherits:
-
Object
- Object
- Benchmark::IPS::Job::StdoutReport
- Defined in:
- lib/benchmark/ips/job/stdout_report.rb
Instance Method Summary collapse
- #add_report(item, caller) ⇒ Object
- #footer ⇒ Object
- #start_running ⇒ Object
- #start_warming ⇒ Object
- #warming(label, _warmup) ⇒ Object (also: #running)
- #warmup_stats(_warmup_time_us, timing) ⇒ Object
Instance Method Details
#add_report(item, caller) ⇒ Object
28 29 30 31 |
# File 'lib/benchmark/ips/job/stdout_report.rb', line 28 def add_report(item, caller) $stdout.puts " #{item.body}" @last_item = item end |
#footer ⇒ Object
33 34 35 36 |
# File 'lib/benchmark/ips/job/stdout_report.rb', line 33 def = @last_item.stats. $stdout.puts .rjust(40) if end |
#start_running ⇒ Object
9 10 11 |
# File 'lib/benchmark/ips/job/stdout_report.rb', line 9 def start_running $stdout.puts "Calculating -------------------------------------" end |
#start_warming ⇒ Object
5 6 7 |
# File 'lib/benchmark/ips/job/stdout_report.rb', line 5 def start_warming $stdout.puts "Warming up --------------------------------------" end |
#warming(label, _warmup) ⇒ Object Also known as: running
13 14 15 |
# File 'lib/benchmark/ips/job/stdout_report.rb', line 13 def warming(label, _warmup) $stdout.print rjust(label) end |
#warmup_stats(_warmup_time_us, timing) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/benchmark/ips/job/stdout_report.rb', line 17 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 |