Exposes node v8 garbage collection stats
npm install gcstats.jsExposes stats about V8 GC after it has been executed.

Create a new instance of the module and subscribe to stats-events from that:
``javascript
var gcStats = require('gcstats.js');
gcStats.on('stats', function(stats) {
console.log('GC happened', stats);
});
`
This will print blobs like this whenever a GC happens:
``
GC happened { start: 635817864674795,
end: 635817865774643,
gctype: 1,
before:
{ totalHeapSize: 277510912,
totalHeapExecutableSize: 5242880,
usedHeapSize: 273621856,
heapSizeLimit: 1535115264,
totalPhysicalSize: 277510912 },
after:
{ totalHeapSize: 277510912,
totalHeapExecutableSize: 5242880,
usedHeapSize: 273533760,
heapSizeLimit: 1535115264,
totalPhysicalSize: 277510912 } }
gctype can have the following values:
* 1: Scavenge (minor GC)
* 2: Mark/Sweep/Compact (major GC)
* 3: Both 1 and 2
``
npm install --save gcstats.js