org.apache.manifoldcf.crawler.interfaces
Class PerformanceStatistics.AveragingQueue

java.lang.Object
  extended by org.apache.manifoldcf.crawler.interfaces.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
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
PerformanceStatistics.AveragingQueue()
          Constructor
 
Method Summary
 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

records

protected PerformanceStatistics.AveragingRecord[] records
The internal structure of the averaging queue is a circular buffer, which gets initialized to the default value


startIndex

protected int startIndex
This is the current start pointer

Constructor Detail

PerformanceStatistics.AveragingQueue

public PerformanceStatistics.AveragingQueue()
Constructor

Method Detail

addRecord

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


calculateFetchRate

public double calculateFetchRate()
Calculate running-average fetch rate