apm

1.0.2 • Public • Published

apm

Actions per minute! Or any other time, actually.

API

default class APM ({accuracy = 1000, timeSpan = 60000})

import APM from 'apm';
 
const apm = new APM({
    accuracy: 500,
    timeSpan: 30000
});
 
setInterval(() => {
    apm.add('example', 1);
}, 500);
 
setTimeout(() => {
    console.log(apm.get('example')); // 60
}, 30000);

add (id, amount)

Adds amount to id.

get (id)

Returns the APM (or per timeSpan) for id.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    204
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    204
  • 1.0.1
    5
  • 1.0.0
    6
  • 0.0.1
    0

Package Sidebar

Install

npm i apm

Weekly Downloads

52

Version

1.0.2

License

MIT

Last publish

Collaborators

  • florianwendelborn