Skip to content

Instantly share code, notes, and snippets.

@coreylight
Last active August 11, 2017 21:08
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 coreylight/f0d2d720b4c8dd472384844b414fdad7 to your computer and use it in GitHub Desktop.
Save coreylight/f0d2d720b4c8dd472384844b414fdad7 to your computer and use it in GitHub Desktop.
const Perf = require('performance-node');
const timeline = new Perf();
timeline.mark('ai-start');
runMachineLearning();
timeline.mark('ai-end');
timeline.measure('ai-measure', 'ai-start', 'ai-end');
const myMeasure = timeline.getEntriesByName('ai-measure')[0];
// {name: 'ai-measure', startTime: 1.2, duration: 10.5, entryType: 'measure'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment