Class PerformanceStatistics.AveragingQueue

  • Enclosing class:
    PerformanceStatistics

    protected static class PerformanceStatistics.AveragingQueue
    extends java.lang.Object
    This class keeps track of some depth of fetch history for an individual connection, and is used to calculate a weighted average fetches-per-minute rate.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected PerformanceStatistics.AveragingRecord[] records
      The internal structure of the averaging queue is a circular buffer, which gets initialized to the default value
      protected int startIndex
      This is the current start pointer
    • Constructor Summary

      Constructors 
      Constructor Description
      AveragingQueue()
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addRecord​(int setSize, long elapsedTime)
      Add a record
      double calculateFetchRate()
      Calculate running-average fetch rate
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • startIndex

        protected int startIndex
        This is the current start pointer
    • Constructor Detail

      • AveragingQueue

        public AveragingQueue()
        Constructor
    • Method Detail

      • addRecord

        public void addRecord​(int setSize,
                              long elapsedTime)
        Add a record
      • calculateFetchRate

        public double calculateFetchRate()
        Calculate running-average fetch rate