java.lang.Object
org.rrd4j.data.Variable
org.rrd4j.data.Variable.PERCENTILE
Direct Known Subclasses:
Variable.PERCENTILENAN
Enclosing class:
Variable

public static class Variable.PERCENTILEextends Variable
Find the point at the n-th percentile.
  • Field Details

    • percentile

      private final float percentile
      Percentile threshold (0-100)
    • withNaN

      private final boolean withNaN
      Whether to include NaN values in calculation
  • Constructor Details

    • PERCENTILE

      protected PERCENTILE(float percentile, boolean withNaN)
      Creates a percentile calculation.
      Parameters:
      percentile - rank to report, 0 for the smallest point through 100 for the largest
      withNaN - whether gap entries take part in the ranking; being ranked below every finite point, they push the reported value up when included
    • PERCENTILE

      public PERCENTILE(double percentile)
      Creates a percentile calculation that lets gap entries count in the ranking.
      Parameters:
      percentile - rank to report, 0 for the smallest point through 100 for the largest
    • PERCENTILE

      public PERCENTILE(float percentile)
      Creates a percentile calculation that lets gap entries count in the ranking.
      Parameters:
      percentile - rank to report, 0 for the smallest point through 100 for the largest
  • Method Details

    • fill

      protected Variable.Value fill(long[] timestamps, double[] values, long start, long end)
      Description copied from class: Variable
      This method is call with the needed values, extracted from the datasource to do the calculation.

      Value is to be filled with both the double value and a possible timestamp, when it's used to find a specific point

      Specified by:
      fill in class Variable
      Parameters:
      timestamps - the timestamps for the value
      values - the actual values
      start - the start of the period
      end - the end of the period
      Returns:
      a filled Value object