Skip to content

Commit

Permalink
attach phase names to timers for static analysis
Browse files Browse the repository at this point in the history
Reviewed By: dkgi

Differential Revision: D23916486

fbshipit-source-id: e391dd637179f010ad42481cca6289f3c1722231
  • Loading branch information
sinancepel authored and facebook-github-bot committed Sep 24, 2020
1 parent 9f7ad43 commit a3c4b2a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion service/staticAnalysis.ml
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ let analyze
~qualifiers
()
=
let pre_fixpoint_timer = Timer.start () in
let get_source = get_source ~environment in

let timer = Timer.start () in
Expand Down Expand Up @@ -348,6 +349,11 @@ let analyze
List.iter override_targets ~f:add_predefined
in
Statistics.performance ~name:"Computed overrides" ~timer ();
Statistics.performance
~name:"Pre-fixpoint computation for static analysis"
~phase_name:"Pre-fixpoint computation for static analysis"
~timer:pre_fixpoint_timer
();
let all_callables = List.rev_append override_targets callables in
Log.info
"Analysis fixpoint started for %d overrides %d functions..."
Expand Down Expand Up @@ -381,7 +387,11 @@ let analyze
in
save_results ();
let errors = Interprocedural.Analysis.extract_errors scheduler all_callables in
Statistics.performance ~name:"Analysis fixpoint complete" ~timer ();
Statistics.performance
~name:"Analysis fixpoint complete"
~phase_name:"Static analysis fixpoint"
~timer
();

(* If saving to a file, don't return errors. Thousands of errors on output is inconvenient *)
if Option.is_some analysis_configuration.result_json_path then
Expand Down

0 comments on commit a3c4b2a

Please sign in to comment.