mempoll

A simple NodeJS memory usage poller.

MIT License

Downloads
17
Stars
1
Committers
1

Mempoll

A simple NodeJS memory usage poller.

Installing

npm install mempoll

Documentation

Documentation and more detailed examples are hosted on Github Pages.

Usage

import { poll } from "mempoll";

poll();

This will print a summary every second:

┌────────────────────┬────────┐
      (index)        Values │
├────────────────────┼────────┤
      Rss / MB      │   28   │
  Heap total / MB   │ 4.102  │
   Heap used / MB   │ 2.275  │
   External / MB    │ 1.074  │
 Array buffers / MB │  0.01  │
└────────────────────┴────────┘

Parameters

import { Worker } from "worker_threads";

const poll: (interval: number = 1000, resolution: number = 3) => Worker;
  • Interval: Polling interval in ms.
  • Resolution: Output figure decimal places.

Tooling

Dependencies

To install dependencies:

yarn install

Tests

To run tests:

yarn test

Documentation

To generate the documentation locally:

yarn docs

Linters

To run linters:

yarn lint

Formatters

To run formatters:

yarn format

Contributing

Please read this repository's Code of Conduct which outlines our collaboration standards and the Changelog for details on breaking changes that have been made.

This repository adheres to semantic versioning standards. For more information on semantic versioning visit SemVer.

Bump2version is used to version and tag changes. For example:

bump2version patch

Contributors

Remarks

Lots of love to the open source community!