提交 c4897f84 编写于 作者: G Graydon Hoare

Add a cumulative timer count to be sure we're getting everything.

上级 1b41d7be
......@@ -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;
;;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册