java.lang.Object
net.i2p.router.JobStats.RecentStats
- Enclosing class:
JobStats
Totals over the most recent runs of one job type.
Field Summary
FieldsModifier and TypeFieldDescriptionfinal longMaximum pending time.final longMaximum time of all runs.final longMinimum pending time.final longMinimum time of all runs.final longNumber of runs.final longTotal pending time across all runs.final longTotal time across all runs.Constructor Summary
ConstructorsConstructorDescriptionRecentStats(long runs, long totalTime, long maxTime, long minTime, long totalPendingTime, long maxPendingTime, long minPendingTime) Recent stats.Method Summary
All MethodsModifier and TypeMethodDescriptiondoubleAverage the queue wait times of the executions in this window.doubleAverage the run times of the executions in this window.
Field Details
runs
public final long runsNumber of runs.totalTime
public final long totalTimeTotal time across all runs.maxTime
public final long maxTimeMaximum time of all runs.minTime
public final long minTimeMinimum time of all runs.totalPendingTime
public final long totalPendingTimeTotal pending time across all runs.maxPendingTime
public final long maxPendingTimeMaximum pending time.minPendingTime
public final long minPendingTimeMinimum pending time.
Constructor Details
RecentStats
RecentStats(long runs, long totalTime, long maxTime, long minTime, long totalPendingTime, long maxPendingTime, long minPendingTime) Recent stats.- Parameters:
runs- the number of runs in the windowtotalTime- the summed run time across those runs, in millisecondsmaxTime- the longest run in the window, or -1 if noneminTime- the shortest run in the window, or -1 if nonetotalPendingTime- the summed queue wait across those runs, in millisecondsmaxPendingTime- the longest queue wait in the window, or -1 if noneminPendingTime- the shortest queue wait in the window, or -1 if none
Method Details
getAvgTime
public double getAvgTime()Average the run times of the executions in this window.- Returns:
- the mean run time in milliseconds, or 0 if no runs were counted
getAvgPendingTime
public double getAvgPendingTime()Average the queue wait times of the executions in this window.- Returns:
- the mean queue wait in milliseconds, or 0 if no runs were counted