<commit_before>redis-metrics
=============

[![Code Climate](https://codeclimate.com/github/Receiptful/redis-metrics/badges/gpa.svg)](https://codeclimate.com/github/Receiptful/redis-metrics) [![Test Coverage](https://codeclimate.com/github/Receiptful/redis-metrics/badges/coverage.svg)](https://codeclimate.com/github/Receiptful/redis-metrics)

Easy metric tracking and aggregation using Redis.

This module was originally created to provide an easy way of storing and
viewing aggregated counter and trend statistics.

In a sense, the libary tries to provide sugar-coated method calls for storing
and fetching Redis data to report counts and trends. The first design goal is to
make counting simpler.

Not ready for production
------------------------

**Warning** The APIs for this libary are not finalized and may change and break
at any time while we are playing around with ideas. Feel free to make
suggestions and requests :-)

Install
-------

```console
$ npm install --save redis-metrics
```

Use
----- 

Basic counter:

```javascript
// Create an instance
var RedisMetrics = require('redis-metrics');
var metrics = new RedisMetrics();
<commit_msg>Add link to documentation site in README<commit_after>redis-metrics
=============

[![Code Climate](https://codeclimate.com/github/Receiptful/redis-metrics/badges/gpa.svg)](https://codeclimate.com/github/Receiptful/redis-metrics) [![Test Coverage](https://codeclimate.com/github/Receiptful/redis-metrics/badges/coverage.svg)](https://codeclimate.com/github/Receiptful/redis-metrics)

Easy metric tracking and aggregation using Redis.

This module was originally created to provide an easy way of storing and
viewing aggregated counter and trend statistics.

In a sense, the libary tries to provide sugar-coated method calls for storing
and fetching Redis data to report counts and trends. The first design goal is to
make counting simpler.

Read on below or read more on the [documentation site](http://receiptful.github.io/redis-metrics/).

Install
-------

```console
$ npm install --save redis-metrics
```

Use
----- 

Basic counter:

```javascript
// Create an instance
var RedisMetrics = require('redis-metrics');
var metrics = new RedisMetrics();

{'fraction_non_alphanumeric': 0.12720688094160254, 'fraction_numerical': 0.0, 'mean_word_length': 4.42997542997543, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6281379', 'n_tokens_mistral': 651, 'n_tokens_neox': 607, 'n_words': 215}