X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=src%2Fmain.ml;fp=src%2Fmain.ml;h=00d5ab93ec9e953163dfb03b0e9757e936564be0;hb=1e6a2cc1fe6d69d45a4605aaf2ee6821a610a231;hp=af00682608a386e512d5c3621d531e5fd13b6590;hpb=28e780c2b3b259a8696a44be932572b91f69583c;p=SXSI%2Fxpathcomp.git diff --git a/src/main.ml b/src/main.ml index af00682..00d5ab9 100644 --- a/src/main.ml +++ b/src/main.ml @@ -22,25 +22,25 @@ let tuned_gc = { default_gc with let mk_runtime run auto doc arg count print outfile = fun () -> if !Config.do_perf then start_perf (); - let r = time ~count:!Config.repeat ~msg:"Execution time" (run auto doc) arg in + let r = Utils.time ~count:!Config.repeat ~msg:"Execution time" (run auto doc) arg in if !Config.do_perf then stop_perf (); Logger.verbose Format.err_formatter "Number of results: %i@\n" (count r); match outfile with None -> () | Some file -> - time ~count:1 ~msg:"Serialization time" (print file !Config.no_wrap_results doc) r + Utils.time ~count:1 ~msg:"Serialization time" (print file !Config.no_wrap_results doc) r ;; let main v query_string output = Tag.init (Tree.tag_operations v); if !Config.docstats then Tree.stats v; let query = - time ~msg:"Parsing query" XPath.parse query_string + Utils.time ~msg:"Parsing query" XPath.parse query_string in Logger.verbose Format.err_formatter "Parsed query:%a@\n" XPath.Ast.print query; let auto, bu_info = - time ~msg:"Compiling query" Compile.compile query + Utils.time ~msg:"Compiling query" Compile.compile query in if !Config.verbose then Ata.print Format.err_formatter auto; Gc.full_major(); @@ -87,7 +87,7 @@ let _ = let document = if Filename.check_suffix !Config.input_file ".srx" then - time + Utils.time ~msg:"Loading file" (Tree.load ~sample:!Config.sample_factor @@ -95,7 +95,7 @@ let _ = !Config.input_file else let v = - time + Utils.time ~msg:"Parsing document" (Tree.parse_xml_uri) !Config.input_file @@ -103,7 +103,7 @@ let _ = let () = if !Config.save_file <> "" then - time + Utils.time ~msg:"Writing file to disk" (Tree.save v) !Config.save_file;