bug fixes, added the count queries
[SXSI/xpathcomp.git] / main.ml
diff --git a/main.ml b/main.ml
index 8264278..ab043b7 100644 (file)
--- a/main.ml
+++ b/main.ml
@@ -59,7 +59,9 @@ let main v query output =
          Printf.eprintf "Execution time %s : " (if !Options.count_only then "(counting only)" else "");
          begin
            if !Options.count_only then
-             failwith "Count only not implemented in this version"
+             let r = time ( run_count auto  )v in
+             let _ = Printf.eprintf "Number of nodes in the result set : %i\n%!" r
+             in ()
            else      
             (* let _ = Gc.set ({ Gc.get() with Gc.max_overhead = 1000000; Gc.space_overhead = 100 }) in *)
              let result = time (if !Options.time then run_time auto else run auto) v in