Skip to content

[hotfix] refine signald read path metrics

aguestuser requested to merge hotfix-refine-signald-read-path-metrics into master

repo tracking


that MR did the following...

context:

  • we are observing suspciously high read latency measurements (read times of several minutes for messages that signalboost instrumentation tells us only take 30 sec to send)
  • hypothesis: since we are counting on every iteration of the readMessage while loop, we are counting the number of seconds spent waiting for messages (since read is blocking) in addition to the amount of time spent processing them

changes:

  • fix: stick the beginning of the read timer inside the callback to messagePipe.read, so we only start measuring once we know we have a message
  • trade-offs:
    • con: we will not measure the amount of time signal spends parsing an envelope from the raw byte array (but this seems uninteresting and in any case impossible to measure without instrumenting libisngal istelf?)
    • pro: we have a tightly bound measure of all the processing time that is attributable to signald

side-effects:

  • extract metrics builders to a singleton class
  • add counters for:
    • times read callback is invoked
    • times messagePipe.read times out
Edited by aguestuser

Merge request reports