From c4897f849c1266506cfbd42a1c53c2866a7b4a1e Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Mon, 26 Jul 2010 12:31:08 -0700 Subject: [PATCH] Add a cumulative timer count to be sure we're getting everything. --- src/boot/driver/main.ml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/boot/driver/main.ml b/src/boot/driver/main.ml index cef66f77d7c..b90454858fc 100644 --- a/src/boot/driver/main.ml +++ b/src/boot/driver/main.ml @@ -423,14 +423,17 @@ exit_if_failed () if sess.Session.sess_report_timing then begin + let cumulative = ref 0.0 in Printf.fprintf stdout "timing:\n\n"; Array.iter begin fun name -> - Printf.fprintf stdout "%20s: %f\n" name - (Hashtbl.find sess.Session.sess_timings name) + let t = Hashtbl.find sess.Session.sess_timings name in + Printf.fprintf stdout "%20s: %f\n" name t; + cumulative := (!cumulative) +. t end - (sorted_htab_keys sess.Session.sess_timings) + (sorted_htab_keys sess.Session.sess_timings); + Printf.fprintf stdout "\n%20s: %f\n" "cumulative" (!cumulative) end; ;;