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.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final Long rate
    • Method Summary

      Modifier and Type Method Description
      Long getRate(Long nowMs) Get the rate in units per second.
      final Long getAccumulatedCount(Long nowMs)
      final Unit update(Long count, Long nowMs)
      final Long getRate()
      • Methods inherited from class org.jitsi.utils.stats.RateTracker

        equals, hashCode, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait