Skip to content

Instantly share code, notes, and snippets.

@icirellik
Created September 16, 2015 06:27
Show Gist options
  • Save icirellik/72041af1788ce2b052f1 to your computer and use it in GitHub Desktop.
Save icirellik/72041af1788ce2b052f1 to your computer and use it in GitHub Desktop.
https://www.npmjs.com/package/v8-profiler
'use strict';
var profiler = require('v8-profiler');
profiler.startProfiling();
// ...
var cpuProfile = profiler.stopProfiling();
require('fs').writeFileSync(__dirname + '/foo.cpuprofile', JSON.stringify(cpuProfile));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment