Package 

Class RateTracker


  • 
    public class RateTracker
    
                        

    Tracks an average rate (of values added via update) over a sliding window. The data is kept in a circular buffer of buckets with a configurable size, which can be efficient in both CPU and memory use. Useful for e.g. calculating the bitrate or packet rate of a stream.