class BenchmarkDriver::Output::Compare
def with_job(job, &block)
-
job
(BenchmarkDriver::Job
) --
def with_job(job, &block) name = job.name if name.length > @name_length $stdout.puts(name) else $stdout.print("%#{@name_length}s" % name) end @job = name @job_results = [] @job_contexts = [] result = block.call $stdout.print(@metrics.first.unit) loop_count = @job_results.first.loop_count if loop_count && @job_results.all? { |r| r.loop_count == loop_count } $stdout.print(" - #{humanize(loop_count)} times") if @job_results.all? { |job_result| !job_result.duration.nil? } $stdout.print(" in") show_durations end end $stdout.puts result end