class BenchmarkDriver::Runner::Once
def run(jobs)
-
jobs
(Array
) --
def run(jobs) jobs = jobs.map do |job| Job.new(**job.to_h.merge(loop_count: 1)) # to show this on output end @output.with_benchmark do jobs.each do |job| @output.with_job(name: job.name) do job.runnable_contexts(@contexts).each do |context| duration = run_benchmark(job, context: context) # no repeat support if BenchmarkDriver::Result::ERROR.equal?(duration) value = BenchmarkDriver::Result::ERROR else value = 1.0 / duration end @output.with_context(name: context.name, executable: context.executable, gems: context.gems, prelude: context.prelude) do @output.report(values: { METRIC => value }, duration: duration, loop_count: 1) end end end end end end