lib/benchmark_driver/runner/once.rb in benchmark_driver-0.15.8 vs lib/benchmark_driver/runner/once.rb in benchmark_driver-0.15.9

- old
+ new

@@ -64,11 +64,11 @@ ) Tempfile.open(['benchmark_driver-', '.rb']) do |f| with_script(benchmark.render(result: f.path)) do |path| IO.popen([*context.executable.command, path], &:read) # TODO: print stdout if verbose=2 - if $?.success? - Float(f.read) + if $?.success? && ((value = Float(f.read)) > 0) + value else BenchmarkDriver::Result::ERROR end end end