process.memoryUsage()

process.memoryUsage()

Returns an object describing the memory usage of the Node.js process measured in bytes.

const util = require('util');

console.log(util.inspect(process.memoryUsage()));

This will generate:

{ rss: 4935680,
  heapTotal: 1826816,
  heapUsed: 650472 }

heapTotal and heapUsed refer to V8's memory usage.

doc_Nodejs
2016-04-30 04:41:17
Comments
Leave a Comment

Please login to continue.