resources-usage

Calculates CPU's (cluster, worker and etc.) load.

Usage no npm install needed!

<script type="module">
  import resourcesUsage from 'https://cdn.skypack.dev/resources-usage';
</script>

README

resources-usage

Module is designed to get worker load.

How to use

interval is a total time in which you want to check statistics. count is call quantity in given interval.

  const { resroucesUsage } = require('resources-usage')

  resourcesUsage(interval, count).then((result) => {
    /**
     * result -> { cpuLoadPercentage: number busyMemoryPercentage: number }
     */
  }).catch()