lib/benchmark_driver/output/compare.rb in benchmark_driver-0.13.3 vs lib/benchmark_driver/output/compare.rb in benchmark_driver-0.14.0

- old
+ new

@@ -114,10 +114,12 @@ ensure $stdout.sync = sync end def humanize(value, width = 10) - if value <= 0 + if value == BenchmarkDriver::Result::ERROR + return " %#{width}s" % 'ERROR' + elsif value < 0 raise ArgumentError.new("Non positive value: #{value.inspect}") end scale = (Math.log10(value) / 3).to_i return "%#{width}s" % value.to_s if scale < 0 # like 1.23e-04