rh

redis-histogram

Redis histograms for nodejs

Showing:

Popularity

Downloads/wk

1

GitHub Stars

14

Maintenance

Last Commit

8yrs ago

Contributors

0

Package

Dependencies

0

Size (min+gzip)

0.5KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

redis-histogram

Redis histogram for node.js

Installation

$ npm install redis-histogram

Example

var Histogram = require('..');
var redis = require('redis');

var hist = new Histogram({
  client: redis.createClient(),
  bins: 10
});

var n = 1000;

while (n--) {
  hist.add(Math.random() * 50 | 0);
}

hist.load(function(err, res){
  console.log(res)
});

API

Histogram(options)

  • client redis client
  • key redis key ["histogram"]
  • bins number of bins [1000]

Histogram#add(value, [fn])

Bin value with optional callback.

Histogram#load(fn)

Load histogram bins.

License

MIT

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial