[analysis] print times for analysis only

Summary:
Previously we would incorrectly report the time for the whole process
and this could include capture time too.

Reviewed By: mityal

Differential Revision: D17423977

fbshipit-source-id: b3ed754b3
master
Jules Villard 5 years ago committed by Facebook Github Bot
parent dfca54fc2a
commit 85977bf327

@ -178,6 +178,7 @@ let invalidate_changed_procedures changed_files =
let main ~changed_files =
let time0 = Mtime_clock.counter () in
register_active_checkers () ;
if Config.reanalyze then (
L.progress "Invalidating procedures to be reanalyzed@." ;
@ -188,7 +189,7 @@ let main ~changed_files =
(* empty all caches to minimize the process heap to have less work to do when forking *)
clear_caches () ;
let stats = analyze source_files in
L.progress "@\nAnalysis finished in %a@." Pp.elapsed_time () ;
L.progress "@\nAnalysis phase finished in %a@." Mtime.Span.pp (Mtime_clock.count time0) ;
L.debug Analysis Quiet "collected stats:@\n%a@." BackendStats.pp stats ;
BackendStats.log_to_scuba stats ;
output_json_makefile_stats source_files

@ -125,9 +125,6 @@ let current_time f () =
tm.Unix.tm_hour tm.Unix.tm_min
(** Print the time in seconds elapsed since the beginning of the execution of the current command. *)
let elapsed_time fmt () = Mtime.Span.pp fmt (Mtime_clock.elapsed ())
let option pp fmt = function
| None ->
F.pp_print_string fmt "[None]"

@ -91,9 +91,6 @@ val to_string : f:('a -> string) -> F.formatter -> 'a -> unit
val current_time : F.formatter -> unit -> unit
(** Print the current time and date in a format similar to the "date" command *)
val elapsed_time : F.formatter -> unit -> unit
(** Print the time in seconds elapsed since the beginning of the execution of the current command. *)
val pair :
fst:(F.formatter -> 'a -> unit)
-> snd:(F.formatter -> 'b -> unit)

Loading…
Cancel
Save