lib/benchmark_driver/output/simple.rb in benchmark_driver-0.12.0 vs lib/benchmark_driver/output/simple.rb in benchmark_driver-0.13.0

- old
+ new

@@ -1,7 +1,7 @@ class BenchmarkDriver::Output::Simple - NAME_LENGTH = 8 + NAME_LENGTH = 10 # @param [Array<BenchmarkDriver::Metric>] metrics # @param [Array<BenchmarkDriver::Job>] jobs # @param [Array<BenchmarkDriver::Context>] contexts def initialize(metrics:, jobs:, contexts:) @@ -26,18 +26,18 @@ $stdout.puts "#{@metrics.first.name} (#{@metrics.first.unit}):" # Show executable names if @context_names.size > 1 $stdout.print("#{' ' * @name_length} ") - @context_name.each do |context_name| + @context_names.each do |context_name| $stdout.print("%#{NAME_LENGTH}s " % context_name) end $stdout.puts end block.call end - rescue + ensure @with_benchmark = false end # @param [BenchmarkDriver::Job] job def with_job(job, &block)