Socket
Socket
Sign inDemoInstall

apm

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    apm

Actions per minute! Or any other time, actually.


Version published
Weekly downloads
30
increased by36.36%
Maintainers
1
Install size
5.37 kB
Created
Weekly downloads
 

Readme

Source

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.

Keywords

FAQs

Last updated on 29 Jun 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc