Remove non-reentrant timing function.
[SXSI/xpathcomp.git] / src / profile.ml
1 let table = Hashtbl.create 103
2
3 let summary fmt =
4   Hashtbl.iter (fun (m, f) d  ->
5     let c, tl = !d in
6     let tspent =
7       List.fold_left (fun acc e -> e +. acc) 0. tl 
8     in
9     Format.fprintf fmt "%s: %s = called %i times, total: %fms, average: %fms\n"
10       m f c tspent (tspent /. (float_of_int c))) table;
11   Format.fprintf fmt "%!"