Conversation
kanongil
left a comment
There was a problem hiding this comment.
You might want update the load values on a check(), similar to eventLoopDelay when elapsed > this.settings.sampleInterval. This should also fix the tests and not need the excessive delay() values.
Actually, looking at it, I'm wondering why check() doesn't do a full measure when elapsed > this.settings.sampleInterval. The memory values have probably also changed, and might be relevant.
|
One consideration: this could break for users of node v12 who aren't on node v12.19+. We could add a temporary fallback behavior until we drop node v12 hapijs/hapi#4279, or wait for hapi v21. |
Thanks for the suggestion @kanongil, tests pass consistently now
As for updating memory values, I think it does make sense. Do you want me to update those as well? |
Right, I think is fine if we wait for hapi 21 to land this changes. How far in the future would that be? |
|
It's TBD but I am a proponent for making this happen relatively soon in order to leave a gap before the EOL for node v12. |
Introduces support to track the event loop utilization, the intent is to add this support to hapi itself as described at hapijs/hapi#4288
Notes:
performance.eventLoopUtilizationis available from Node 12.19.0. Not certain if introducing this support would be a breaking change or not.