mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-24 16:12:31 +00:00
8db30020ae
If we monitor with setImmediate, we miss big blocking loops. For example, suppose we have 1000 1ms loops then a single bad 1000ms loop. setImmediate will only be called at the right time 1/1000 of the time (it has to be the loop just before the bad one). So this monitoring method gives a good average if the std dev is low, but doesn't pick up spikes. Instead, we can monitor the skew from the expected time between setIntervals. In the case above, with a setInterval for 1000ms, we will pick up a skew proportional to the amount of time that it overlaps the bad loop. So 50% change of picking up skew > 500ms, and thus getting a good sense of any spikes. |
||
---|---|---|
.. | ||
.gitignore | ||
event_loop.coffee | ||
http.coffee | ||
index.js | ||
LICENSE | ||
memory.coffee | ||
metrics.coffee | ||
mongodb.coffee | ||
open_sockets.coffee | ||
package.json |