Redis statistics utility library
- Percentile on zSet
Missing some statistics ? Feel free to contribute creating a PR ;)
var redis = require("redis");
var RedisStatistics = require("redis-statistics");
var stats = new RedisStatistics(redis.createClient());
stats
.zPercentile("zset-key", 50)
.then(function(percentile){
console.log("median is: ", percentile);
}}
.catch(function(err){
console.log("an error occured", err);
}};