pretty-heap-used
v0.0.0
Published
extend process.memoryUsage's return by pretty properties on heap usage
Downloads
4
Readme
pretty-heap-used
Basically process.memoryUsage()
+ .heapUsedPercent
+ .heapUsedMB
.
Get it
npm install --save pretty-heap-used
Usage
Just pass the return object of process.memoryUsage
to the prettifier and gain two extra pretty properties.
const prettyHeap = require('pretty-heap-used')
prettyHeap(process.memoryUsage())
// -> { rss: 123, heapTotal: 123, heapUsed: 123, external: 123, heapUsedPercent: 0.123, heapUsedMB: 123 }