statsly

0.1.1 • Public • Published

Statsly

npm version

Statsly is a stats collector leveraging redisDB and influxDB

Installation

Run npm install statsly

Usage

First of all you should register your category (statsly.register('cat')). after that you can start incrementing stats for your category:

statsly.increment('cat', 'successRequest', 1)

Now in-order to periodically insert data influx you should start stats collector:

const frequency = 5 * 60 * 1000 // 5 min
statsly.startCollector(frequency)

Collector only insert stats for registered categories

Example

Check out examples/ folder for more example and usages.

Package Sidebar

Install

npm i statsly

Weekly Downloads

0

Version

0.1.1

License

GPL-3.0-or-later

Unpacked Size

43.7 kB

Total Files

6

Last publish

Collaborators

  • amiryaghoobi