yahoo / monitr

A Node.js process monitoring tool.
BSD 3-Clause "New" or "Revised" License
317 stars 39 forks source link

Add garbage collection stats to monitr #28

Closed evantorrie closed 9 years ago

evantorrie commented 9 years ago

We hook into the v8 garbage collection prologue/epilogue events and track time spent in between those two calls, along with the number of times GC is called in between each reporting interval.

The prologue/epilogue hooks are run in the context of the v8 thread, whereas the reporting is in a separate thread (the monitr thread). For this reason we need to protect the garbage collection statistics by a mutex to prevent the reporter getting half-filled GC statistics.

yahoocla commented 9 years ago

CLA is valid!

evantorrie commented 9 years ago

oops - had a typo creep in. Closing this in favour of a new one.