Last active
January 14, 2019 09:38
-
-
Save tnguven/2d2391fc39655fa75be35e12600a74e1 to your computer and use it in GitHub Desktop.
process.memoryUsage() template
This file contains 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 byteToMb = byte => (byte / 1024) / 1024; | |
const { rss, heapTotal, heapUsed, external } = process.memoryUsage() | |
console.log({ | |
rss: `${byteToMb(rss)}mb`, | |
heapTotal: `${byteToMb(heapTotal)}mb`, | |
heapUsed: `${byteToMb(heapUsed)}mb`, | |
external: `${byteToMb(external)}mb` | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment