diff --git a/source/analysis/astEnvironment.ml b/source/analysis/astEnvironment.ml index 8fa92d661ab..1a5be1c1946 100644 --- a/source/analysis/astEnvironment.ml +++ b/source/analysis/astEnvironment.ml @@ -384,11 +384,12 @@ module FromReadOnlyUpstream = struct error recovery for the purposes of error recovery quality management *) ["raw_code", raw_code]) in - Statistics.errpy_call ~name:"ok" ~timer ~integers ~normals () + Statistics.errpy_call ~flush:false ~name:"ok" ~timer ~integers ~normals () in let log_errpy_error ~error_string = Statistics.errpy_call + ~flush:true ~name:"error" ~timer ~integers:[] diff --git a/source/statistics.ml b/source/statistics.ml index 3d058fc8486..f2ecc4928c1 100644 --- a/source/statistics.ml +++ b/source/statistics.ml @@ -251,7 +251,7 @@ let event sample ~integers ~normals:(("name", name) :: normals) () |> log ~flush "perfpipe_pyre_events" -let errpy_call ~name ~timer ~integers ~normals () = +let errpy_call ~flush ~name ~timer ~integers ~normals () = let time_in_seconds = Timer.stop_in_sec timer in let integer_time_in_microseconds = time_in_seconds *. 1e6 |> Int.of_float in @@ -259,7 +259,7 @@ let errpy_call ~name ~timer ~integers ~normals () = let normals = ("name", name) :: normals in Log.log ~section:`Errpy "%s%s" (String.capitalize name) (format_as_text ~integers ~normals ()); - sample ~integers ~normals () |> log ~flush:true "perfpipe_errpy_calls" + sample ~integers ~normals () |> log ~flush "perfpipe_errpy_calls" let log_model_query_outputs diff --git a/source/statistics.mli b/source/statistics.mli index ad4439d209b..e23b632bf11 100644 --- a/source/statistics.mli +++ b/source/statistics.mli @@ -76,7 +76,8 @@ val buck_event val log_worker_exception : pid:int -> origin:string -> Unix.process_status -> unit val errpy_call - : name:string -> + : flush:bool -> + name:string -> timer:Timer.t -> integers:(string * int) list -> normals:(string * string) list ->