class BenchmarkDriver::Output::Simple
def with_benchmark(&block)
def with_benchmark(&block) @with_benchmark = true without_stdout_buffering do # Show header $stdout.puts "#{@metrics.first.name} (#{@metrics.first.unit}):" # Show executable names if @context_names.size > 1 $stdout.print("#{' ' * @name_length} ") @context_names.each do |context_name| $stdout.print("%#{NAME_LENGTH}s " % context_name) end $stdout.puts end block.call end ensure @with_benchmark = false end