Resurect the HTML trace. Now generates a single HTML file containing the SVG.
[tatoo.git] / src / tatoo.ml
index d8c3e09..57d5f1a 100644 (file)
@@ -53,6 +53,7 @@ let main () =
     let d = time Naive_tree.load_xml_file fd "parsing xml document" in
     close_fd (); d
   in
+  let () = Gc.compact () in
   let queries =
     time
       (fun l ->
@@ -120,6 +121,13 @@ 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@\ntransition fetch cache hit ratio: %f@\ntransition eval cache hit ratio: %f@]"
+    s.tree_size s.run
+    (float s.fetch_trans_cache_hit /. float s.fetch_trans_cache_access)
+    (float s.eval_trans_cache_hit /. float s.eval_trans_cache_access));
   time (fun () ->
     let count = ref 1 in
     List.iter (fun results ->