From e152ba8f333c33ec52e029159e4f2d72f412d27c Mon Sep 17 00:00:00 2001 From: Nikos Gorogiannis Date: Mon, 7 Dec 2020 04:20:23 -0800 Subject: [PATCH] [stats] fix analyzed count Summary: When using the restart scheduler incrementing the analyzed count before the analysis itself gives wrong results. Reviewed By: jvillard Differential Revision: D25367787 fbshipit-source-id: aed22cc68 --- infer/src/backend/ondemand.ml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/infer/src/backend/ondemand.ml b/infer/src/backend/ondemand.ml index 04e89aec7..4c2c5a11a 100644 --- a/infer/src/backend/ondemand.ml +++ b/infer/src/backend/ondemand.ml @@ -157,9 +157,10 @@ let update_taskbar callee_pdesc = let analyze callee_summary = - BackendStats.incr_ondemand_procs_analyzed () ; let exe_env = Option.value_exn !exe_env_ref in - Callbacks.iterate_procedure_callbacks exe_env callee_summary + let summary = Callbacks.iterate_procedure_callbacks exe_env callee_summary in + BackendStats.incr_ondemand_procs_analyzed () ; + summary let run_proc_analysis ~caller_pdesc callee_pdesc =