Class ExponentialDecay

java.lang.Object
io.airlift.stats.ExponentialDecay

public final class ExponentialDecay extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static double
    computeAlpha(double targetWeight, long targetAgeInSeconds)
    Compute the alpha decay factor such that the weight of an entry with age 'targetAgeInSeconds' is targetWeight'
    static double
     
    static double
     
    static double
     
    static double
    seconds(int seconds)
     
    static double
    weight(double alpha, long now, long landmark)
    Compute the forward-decay multiplier (inverse of the decay factor)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • oneMinute

      public static double oneMinute()
    • fiveMinutes

      public static double fiveMinutes()
    • fifteenMinutes

      public static double fifteenMinutes()
    • seconds

      public static double seconds(int seconds)
    • computeAlpha

      public static double computeAlpha(double targetWeight, long targetAgeInSeconds)
      Compute the alpha decay factor such that the weight of an entry with age 'targetAgeInSeconds' is targetWeight'
    • weight

      public static double weight(double alpha, long now, long landmark)
      Compute the forward-decay multiplier (inverse of the decay factor)