Skip to content

Commit

Permalink
make sure we do not go over the timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
zapashcanon committed Aug 26, 2024
1 parent 03a8049 commit edf7240
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bench/tool/tool.ml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,12 @@ let wait_pid =
let stime = stime_diff in
let clock = end_time -. start_time in

(* Sometimes the clock goes a little bit above the allowed timeout... *)
let clock = min clock timeout in
let rusage = { Report.Rusage.clock; utime; stime } in
if !did_timeout then Report.Run_result.Timeout rusage

if !did_timeout || Float.equal clock timeout then
Report.Run_result.Timeout rusage
else
match status with
| WEXITED code -> begin
Expand Down

0 comments on commit edf7240

Please sign in to comment.