1.1.2 • Published 6 months ago

monitor-resources-js v1.1.2

Weekly downloads
-
License
ISC
Repository
-
Last release
6 months ago

JS Resource Monitor

This npm package is designed to monitor the resources utilized by a JavaScript application. It captures resource metrics at specific intervals and stores the results in CSV format realtime.

Install

npm i monitor-resources-js

Usage

Monitor Memory

const {monitorMemory} = require("monitor-resources-js");
...

monitorMemory(options);

Monitor CPU

const {monitorCpu} = require("monitor-resources-js");
...

monitorCpu(options);

Monitor both Memory and CPU

const {monitorAll} = require("monitor-resources-js");
...

monitorAll(options);

options

  • interval: Time interval in milliseconds to monitor and log resource consumption (default: 5000).
  • outputDir: Output directory to save the CSV file with resource consumption (default: rs-monitor).
  • transformMemoryValue: Function to apply additional calculations or transformations on memory measurements (default: (value) => value / 1000000).
  • transformCpuValue: Function to apply additional calculations or transformations on CPU measurements (default: (_) => _).

Source

EduardoPetrini/monitor-resources-js

1.1.1

6 months ago

1.1.0

6 months ago

1.1.2

6 months ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago