Skip to content

Instantly share code, notes, and snippets.

@prestonp
Last active August 29, 2015 14:01
Show Gist options
  • Save prestonp/bf6921f16e3bfd54a2b4 to your computer and use it in GitHub Desktop.
Save prestonp/bf6921f16e3bfd54a2b4 to your computer and use it in GitHub Desktop.
heapdump
// Step 1: npm install heapdump
// Step 2: Paste this snippet in your main
// app to create heap snapshots that you
// can view in the chrome profiler
require('heapdump');
setInterval(function() {
process.kill(process.pid, 'SIGUSR2');
}, 15000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment