let table = Hashtbl.create 103
let summary fmt =
+ Logger.start_msg fmt "[Stats] Function profiling:";
+ Logger.msg fmt "@\n @[<v 0>";
Hashtbl.iter (fun (m, f) d ->
let c, tl = !d in
let tspent =
List.fold_left (fun acc e -> e +. acc) 0. tl
in
- Format.fprintf fmt "%s: %s = called %i times, total: %fms, average: %fms\n"
+ Logger.msg fmt "%s: %s = called %i times, total: %fms, average: %fms@\n"
m f c tspent (tspent /. (float_of_int c))) table;
- Format.fprintf fmt "%!"
+ Logger.end_msg Format.err_formatter "\n\n"
+