]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/matita/matitaEngine.ml
A bit of profiling functions added here and there.
[helm.git] / helm / matita / matitaEngine.ml
index 4bb40797527a38bb03cbec392cb0e82df5675aae..3658b0c20ab93d2990a9a73717faaf35c87bf463 100644 (file)
@@ -691,6 +691,8 @@ let make_absolute paths path =
    with Unix.Unix_error _ as exc -> raise (UnableToInclude path)
 ;;
        
+let profiler_include = CicUtil.profile "include"
+
 let eval_command opts status cmd =
   let status,cmd = disambiguate_command status cmd in
   let cmd,notation_ids' = CicNotation.process_notation cmd in
@@ -709,7 +711,8 @@ let eval_command opts status cmd =
         raise (IncludedFileNotCompiled moopath) in
      let stream = Stream.of_channel ic in
      let status = ref status in
-      !eval_from_stream_ref status stream (fun _ _ -> ());
+      profiler_include.CicUtil.profile
+       (!eval_from_stream_ref status stream) (fun _ _ -> ());
       close_in ic;
       !status
   | GrafiteAst.Set (loc, name, value) ->