projects
/
SXSI
/
xpathcomp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'split-options-config'
[SXSI/xpathcomp.git]
/
src
/
profile.ml
diff --git
a/src/profile.ml
b/src/profile.ml
index
c43dda6
..
a0be76b
100644
(file)
--- a/
src/profile.ml
+++ b/
src/profile.ml
@@
-1,11
+1,14
@@
let table = Hashtbl.create 103
let summary fmt =
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
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;
m f c tspent (tspent /. (float_of_int c))) table;
- Format.fprintf fmt "%!"
+ Logger.end_msg Format.err_formatter "\n\n"
+