Package net.i2p.stat

Class RateAverages

java.lang.Object
net.i2p.stat.RateAverages

public class RateAverages
extends Object
Storage space for computations of various averages.
Since:
0.9.4
Author:
zab
  • Constructor Details

  • Method Details

    • getTemp

      public static RateAverages getTemp()
      Returns:
      thread-local temp instance.
      Since:
      0.9.4
    • reset

      void reset()
    • getAverage

      public double getAverage()
      Returns:
      one of several things: if there are any events (current or last) => weighted average otherwise if the useLifetime parameter to Rate.computeAverages was: true => the lifetime average value false => zero
      Since:
      0.9.4
    • setAverage

      void setAverage​(double average)
    • getCurrent

      public double getCurrent()
      Returns:
      the current average == current value / current event count
      Since:
      0.9.4
    • setCurrent

      void setCurrent​(double current)
    • getLast

      public double getLast()
      Returns:
      the last average == last value / last event count
      Since:
      0.9.4
    • setLast

      void setLast​(double last)
    • getTotalEventCount

      public long getTotalEventCount()
      Returns:
      the total event count == current + last event counts
      Since:
      0.9.4
    • setTotalEventCount

      void setTotalEventCount​(long totalEventCount)
    • getTotalValues

      public double getTotalValues()
      Returns:
      the total values == current + last values
      Since:
      0.9.4
    • setTotalValues

      void setTotalValues​(double totalValues)