Class PercentileDef

  • All Implemented Interfaces:
    ConsolFuns

    public class PercentileDef
    extends Source
    • Constructor Detail

      • PercentileDef

        PercentileDef​(String name,
                      Source source,
                      double percentile)
      • PercentileDef

        PercentileDef​(String name,
                      Source source,
                      double percentile,
                      boolean ignorenan)
    • Method Detail

      • calculate

        public void calculate​(long tStart,
                              long tEnd)
                       throws RrdException
        Realize the calculation of this definition, over the given time period
        Parameters:
        tStart - the time period start
        tEnd - the time period end
        Throws:
        RrdException - Thrown if we cannot get a percentile value for the time period.
      • setTimestamps

        void setTimestamps​(long[] timestamps)
        Overrides:
        setTimestamps in class Source
      • getAggregates

        Aggregates getAggregates​(long tStart,
                                 long tEnd)
                          throws RrdException
        Same as SDef; the aggregates of a static value are all just the same static value. Assumes this def has been realized by calling calculate(), otherwise the aggregated values will be NaN
        Overrides:
        getAggregates in class Source
        Throws:
        RrdException
      • getPercentile

        double getPercentile​(long tStart,
                             long tEnd,
                             double percentile)
                      throws RrdException
        Returns just the calculated percentile; the "Xth" percentile of a static value is the static value itself. Assumes this def has been realized by calling calculate(), otherwise the aggregated values will be NaN
        Overrides:
        getPercentile in class Source
        Throws:
        RrdException