lib/benchmark_driver/output/simple.rb in benchmark_driver-0.13.3 vs lib/benchmark_driver/output/simple.rb in benchmark_driver-0.14.0
- old
+ new
@@ -75,10 +75,12 @@
ensure
$stdout.sync = sync
end
def humanize(value)
- if value < 0
+ if value == BenchmarkDriver::Result::ERROR
+ return 'ERROR'
+ elsif value < 0
raise ArgumentError.new("Negative value: #{value.inspect}")
end
scale = (Math.log10(value) / 3).to_i
prefix = "%6.3f" % (value.to_f / (1000 ** scale))