You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@retrohacker I'm using handler timers to provide insight into where time is spent within my endpoint handler (since almost all the cpu time is spent in the endpoint handler rather than middleware.)
Let's say I have an expensive function, 'collapse' and I call req.startHandlerTimer("collapse") / req.endHandlerTimer("collapse") around its invocation to record the time spent within a request. I collapse gets called multiple times in a single request its audit timer no longer shows what proportion of the request was spent executing collapse, only the duration of the final execution.
Ideally each individual time might be logged to an array, though that would involve downstream logging changes.
lrowe
added a commit
to lrowe/node-restify
that referenced
this issue
Aug 10, 2017
Bug Report
Restify Version
5.x
Node.js Version
6.x
Expected behaviour
Audit log timers should accumulate their value when startHandlerTimer/endHandlerTimer is called more than once for the same timer name.
Actual behaviour
Audit log timer is overwritten.
Repro case
See test in #1443.
Cause
node-restify/lib/plugins/audit.js
Lines 85 to 90 in 5169db7
Are you willing and able to fix this?
Yes.
The text was updated successfully, but these errors were encountered: