Skip to content

Instantly share code, notes, and snippets.

@nkallen
Created September 4, 2013 20:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nkallen/6442106 to your computer and use it in GitHub Desktop.
Save nkallen/6442106 to your computer and use it in GitHub Desktop.
before(function() {
var args = [].slice.call(arguments)
function cb() {
gc()
if (ITERATIONS--)
test.apply(null, args)
else
process.nextTick(endCb)
}
args.push(cb)
cb()
})
function endCb() {
gc()
heapdump.writeSnapshot()
var diff = hd.end()
console.log("Heap diff results:".white.bold)
console.log(prettyjson.render(diff))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment