example usage...
var heapdump = require('heapdump');
The module exports a single `writeSnapshot([filename], [callback])` function
that writes out a snapshot. `filename` defaults to
`heapdump-<sec>.<usec>.heapsnapshot` when omitted.
heapdump.writeSnapshot('/var/local/' + Date.now() + '.heapsnapshot'
;);
The function also takes an optional callback function which is called upon
completion of the heap dump.
heapdump.writeSnapshot(function(err, filename) {
console.log('dump written to', filename);
});
...