Created
August 13, 2018 10:16
-
-
Save izumskee/e21fb9fdfe4de18cd3e0928ce3e71adf to your computer and use it in GitHub Desktop.
Mesure function execution time in nodejs
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
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