lib/benchmark_driver/runner/ips.rb in benchmark_driver-0.15.8 vs lib/benchmark_driver/runner/ips.rb in benchmark_driver-0.15.9
- old
+ new
@@ -106,11 +106,11 @@
)
duration = 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