java.lang.Object
net.i2p.router.JobStats.RecentStats
Enclosing class:
JobStats

public static class JobStats.RecentStatsextends Object
Totals over the most recent runs of one job type.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final long
    Maximum pending time.
    final long
    Maximum time of all runs.
    final long
    Minimum pending time.
    final long
    Minimum time of all runs.
    final long
    Number of runs.
    final long
    Total pending time across all runs.
    final long
    Total time across all runs.
  • Constructor Summary

    Constructors
    Constructor
    Description
    RecentStats(long runs, long totalTime, long maxTime, long minTime, long totalPendingTime, long maxPendingTime, long minPendingTime)
    Recent stats.
  • Method Summary

    All Methods
    Modifier and Type
    Method
    Description
    double
    Average the queue wait times of the executions in this window.
    double
    Average the run times of the executions in this window.

    Methods inherited from class Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • runs

      public final long runs
      Number of runs.
    • totalTime

      public final long totalTime
      Total time across all runs.
    • maxTime

      public final long maxTime
      Maximum time of all runs.
    • minTime

      public final long minTime
      Minimum time of all runs.
    • totalPendingTime

      public final long totalPendingTime
      Total pending time across all runs.
    • maxPendingTime

      public final long maxPendingTime
      Maximum pending time.
    • minPendingTime

      public final long minPendingTime
      Minimum 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 window
      totalTime - the summed run time across those runs, in milliseconds
      maxTime - the longest run in the window, or -1 if none
      minTime - the shortest run in the window, or -1 if none
      totalPendingTime - the summed queue wait across those runs, in milliseconds
      maxPendingTime - the longest queue wait in the window, or -1 if none
      minPendingTime - 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