memstats

1.0.3 • Public • Published

npm version CodeQL Build Status

memstats

A small tool for checking memory usage of the current Node.js process.

Install

npm install memstats --save

Usage

This package provides very small API for getting system memory statistics and uptime.

Examples

Example #1

const MemStats = require('memstats');

const stats = MemStats.json();

console.log(stats);

This will print the object with statistics:

{
  "maxMemoryAvailable": "4.04 Gb",
  "processMemoryUsed": "48.59 MB",
  "uptime": "0 min"
}

Tests

Run tests:

npm test

Run tests with code coverage:

npm run test-cov

/memstats/

    Package Sidebar

    Install

    npm i memstats

    Weekly Downloads

    4

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    15.1 kB

    Total Files

    19

    Last publish

    Collaborators

    • olehch