Skip to content

Commit c4897f8

Browse files
committed
Add a cumulative timer count to be sure we're getting everything.
1 parent 1b41d7b commit c4897f8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Diff for: src/boot/driver/main.ml

+6-3
Original file line numberDiff line numberDiff line change
@@ -423,14 +423,17 @@ exit_if_failed ()
423423
if sess.Session.sess_report_timing
424424
then
425425
begin
426+
let cumulative = ref 0.0 in
426427
Printf.fprintf stdout "timing:\n\n";
427428
Array.iter
428429
begin
429430
fun name ->
430-
Printf.fprintf stdout "%20s: %f\n" name
431-
(Hashtbl.find sess.Session.sess_timings name)
431+
let t = Hashtbl.find sess.Session.sess_timings name in
432+
Printf.fprintf stdout "%20s: %f\n" name t;
433+
cumulative := (!cumulative) +. t
432434
end
433-
(sorted_htab_keys sess.Session.sess_timings)
435+
(sorted_htab_keys sess.Session.sess_timings);
436+
Printf.fprintf stdout "\n%20s: %f\n" "cumulative" (!cumulative)
434437
end;
435438
;;
436439

0 commit comments

Comments
 (0)