Skip to content

Instantly share code, notes, and snippets.

@izumskee
Created August 13, 2018 10:16
Show Gist options
  • Save izumskee/e21fb9fdfe4de18cd3e0928ce3e71adf to your computer and use it in GitHub Desktop.
Save izumskee/e21fb9fdfe4de18cd3e0928ce3e71adf to your computer and use it in GitHub Desktop.
Mesure function execution time in nodejs
let hrstart = process.hrtime();
// func do smth...
let hrend = process.hrtime(hrstart);
console.info('Execution time (hr): %ds %dms', hrend[0], hrend[1] / 1000000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment