public class PerformanceStatistics
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected static class |
PerformanceStatistics.AveragingQueue
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.
|
protected static class |
PerformanceStatistics.AveragingRecord
This class contains the data for a single document set against the given connection
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
_rcsid |
protected java.util.HashMap |
connectionHash
This hash is keyed by the connection name, and has elements of type AveragingQueue
|
protected static double |
DEFAULT_FETCH_RATE
This is the fetch rate that will be returned in the complete absence of any other information.
|
protected static long |
DEFAULT_FETCH_TIME |
protected static double[] |
weights
These are the weighting coefficients for the average.
|
Constructor and Description |
---|
PerformanceStatistics()
Constructor
|
Modifier and Type | Method and Description |
---|---|
double |
calculateConnectionFetchRate(java.lang.String connectionName)
Obtain current average document fetch rate (in documents per minute per connection)
|
void |
noteDocumentsCompleted(java.lang.String connectionName,
int documentSetSize,
long elapsedTime)
Note the successful completion of a set of documents using a single connection, and record the statistics for them.
|
public static final java.lang.String _rcsid
protected static double DEFAULT_FETCH_RATE
protected static long DEFAULT_FETCH_TIME
protected static double[] weights
protected java.util.HashMap connectionHash
public void noteDocumentsCompleted(java.lang.String connectionName, int documentSetSize, long elapsedTime)
public double calculateConnectionFetchRate(java.lang.String connectionName)