Created
March 7, 2019 00:14
-
-
Save frontrangerider2004/4128046ed5b24e04af0e24cbcd413321 to your computer and use it in GitHub Desktop.
Nodejs memory usage by script
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
const megabytes = Math.round(process.memoryUsage().heapUsed / 1024 / 1024); | |
console.log(`The script uses approximately ${megabytes} MB`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment