Skip to content

liwenzhu/showmemory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

showmemory

Show memory usage in current process.

NPM NPM

Installation

$ npm install showmemory

Usage

You can pass an interval time to showmemory, default is 1000;

var showMemory = require('showmemory');
showMemory(5000); // show memory every 5 second

output:

Process: heapTotal 5.88 MB heapUsed 2.25 MB rss 12.86 MB
---------------------------------------------------------
Process: heapTotal 5.88 MB heapUsed 2.26 MB rss 12.87 MB
---------------------------------------------------------
Process: heapTotal 5.88 MB heapUsed 2.26 MB rss 12.87 MB
---------------------------------------------------------
Process: heapTotal 5.88 MB heapUsed 2.27 MB rss 12.88 MB
---------------------------------------------------------

when you use showMemory, the process will never stop untill you use ctrl + c.

About

Show memory usage in current process.

Resources

License

Stars

Watchers

Forks

Packages

No packages published