Created
September 16, 2014 19:03
-
-
Save elhoyos/ac462c921317394945fc to your computer and use it in GitHub Desktop.
heapdump snippet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var heapdump = require("heapdump"); | |
| function handleCallback(err) { | |
| callback(err); | |
| gc(); | |
| process.nextTick(function () { | |
| heapdump.writeSnapshot('/var/local/' + Date.now() + '.heapsnapshot', function() { | |
| console.log('dump complete'); | |
| }); | |
| }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment