Print detailed statisticts of the run.
[tatoo.git] / src / tatoo.ml
index d8c3e09..ca16227 100644 (file)
@@ -120,6 +120,12 @@ let main () =
     in
     time f () ("evaluating query in " ^ msg ^ " mode")
   in
+  let s = Naive.stats () in
+  Run.(
+  Logger.msg `STATS "@[tree size: %d@\ntraversals: %d@\ncache2 hit ratio: %f@\ncache5 hit ratio: %f@]"
+    s.tree_size s.run
+    (float s.cache2_hit /. float s.cache2_access)
+    (float s.cache5_hit /. float s.cache5_access));
   time (fun () ->
     let count = ref 1 in
     List.iter (fun results ->