function swsBucketStats(buckets) {

    // Total count of events that have been observed
    this.count = 0;

    // Buckets boundaries, with default bucket values
    this.buckets = [5, 10, 25, 50, 100, 250, 500, 1000, 2500, 5000, 10000];

    // Values
    this.values = [0,0,0,0,0,0,0,0,0,0,0,0];

    if(typeof buckets === "object" ){
        if( Array.isArray(buckets)){
            this.buckets = Array.from(buckets);
            this.values = new Array(this.buckets.length);
            this.values.fill(0);
            this.values.push(0);
        }
    }

}
Bucket Statistic: count value per specified buckets.
Used to show histogram