Created
December 30, 2017 03:19
-
-
Save davidraedev/e125624f50ac076fc212dbf2b9cfc5f0 to your computer and use it in GitHub Desktop.
node log memory
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
function logMem() { | |
const used = process.memoryUsage(); | |
let str = ""; | |
for ( let key in used ) | |
str += key + ": " + ( Math.round( used[ key ] / 1024 / 1024 * 100 ) / 100 ) + "MB\n"; | |
log.info( str ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment