[hotfix] refine signald read path metrics
repo tracking
- this adopts the signald build created in
team-friendo/signald-fork
MR14: signald-fork!14 (merged) - which is just to say, it pins our signald container to:
- REPO_URL "https://0xacab.org/team-friendo/signald-fork.git"
- BRANCH "master"
- COMMIT_HASH "d4d0cc130906989f90b471436d568c28646474b4"
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