0.1.1 • Published 5 years ago

statsly v0.1.1

Weekly downloads
3
License
GPL-3.0-or-later
Repository
-
Last release
5 years ago

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.