Node.js has been shipped with modules that can enable our application to retrive information about the system status suh as memory usage, platform of OS, number of CPUs, etc. Those modules are OS
and V8
. Some usage examples are as follows.
const os = require('os');
const v8 = require('v8');
console.log('Platform:', os.platform()),
console.log('Number of CPUs:', os.cpus().length),
console.log('Free Memory:', os.freemem()),
console.log('Current Malloced Memory:', v8.getHeapStatistics().malloced_memory),
console.log('Peak Malloced Memory:', v8.getHeapStatistics().peak_malloced_memory),
console.log('Size Limit of Heap Memory:', v8.getHeapStatistics().heap_size_limit),
console.log('Total Heap Memory:', v8.getHeapStatistics().total_heap_size),
console.log('Used Heap Memory:', v8.getHeapStatistics().used_heap_size),
Heap memory is space of memory that is allocated for storing dynamic objects in Node.js
nice informative site. i hope if you want to more information please
ReplyDeleteclick https://www.bizboostup.com/product/buy-google-reviews/ for know
more