Skip to content

Commit

Permalink
Back out "Immediate flush of ERRPY telemetry"
Browse files Browse the repository at this point in the history
Summary: This change backs out the change to more quickly flush ERRPY telemetry. Note that this does not fix the underlying bug which this change had surfaced, but landing this diff will mean that if we upgrade the pyre server used by codenav (accidentally or deliberately as in D47814753), codenav won't start failing at an unacceptable rate as it was before again.

Reviewed By: grievejia

Differential Revision: D47973365

fbshipit-source-id: 9ffae92bedd5fc0d867d63c46cb5dd459ba7af04
  • Loading branch information
jasontatton authored and facebook-github-bot committed Aug 2, 2023
1 parent 69ccab7 commit addf415
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion source/analysis/astEnvironment.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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:[]
Expand Down
4 changes: 2 additions & 2 deletions source/statistics.ml
Original file line number Diff line number Diff line change
Expand Up @@ -251,15 +251,15 @@ 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

let integers = ("elapsed_time", integer_time_in_microseconds) :: integers in
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
Expand Down
3 changes: 2 additions & 1 deletion source/statistics.mli
Original file line number Diff line number Diff line change
Expand Up @@ -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 ->
Expand Down

0 comments on commit addf415

Please sign in to comment.