Skip to content

Commit

Permalink
driver.mld: Fail metrics collection if a command hasn't run
Browse files Browse the repository at this point in the history
This aborts some obviously broken metric collections. This situation
happens when a dependency is missing or if only some blocks have failed.
  • Loading branch information
Julow committed Sep 26, 2023
1 parent ca9237f commit 6f87895
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/driver.mld
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ let compute_metric_cmd cmd =
compute (min min_ hd.time) (max max_ hd.time) (total +. hd.time) (count + 1) tl
in
match filter_commands cmd with
| [] -> []
| [] -> failwith ("No commands run for " ^ cmd)
| hd :: tl ->
let min, max, avg, count = compute hd.time hd.time hd.time 1 tl in
[
Expand Down Expand Up @@ -854,7 +854,7 @@ let compute_produced_cmd cmd =
compute (min min_ size) (max max_ size) (total +. float size) (count + 1) tl
in
match List.filter_map output_file_size (filter_commands cmd) with
| [] -> []
| [] -> failwith ("No commands run for " ^ cmd)
| size0 :: tl ->
let min, max, avg, count = compute size0 size0 (float size0) 1 tl in
[
Expand Down

0 comments on commit 6f87895

Please sign in to comment.