java.lang.Object
org.rrd4j.data.Aggregator

class Aggregatorextends Object
Aggregates RRD data values over specified time periods.
Provides statistical aggregation functions for time-series data with configurable time steps and value arrays.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final long
    Time step between data points
    private final long[]
    Timestamps for data points
    private final double[]
    Data values
  • Constructor Summary

    Constructors
    Constructor
    Description
    Aggregator(long[] timestamps, double[] values)
    Array of timestamps.
  • Method Summary

    All Methods
    Modifier and Type
    Method
    Description
    (package private) double
    getPercentile(long tStart, long tEnd, double percentile)
    Calculates percentile value for data in time range.

    Methods inherited from class Object

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

    • timestamps

      private final long[] timestamps
      Timestamps for data points
    • step

      private final long step
      Time step between data points
    • values

      private final double[] values
      Data values
  • Constructor Details

    • Aggregator

      Aggregator(long[] timestamps, double[] values)
      Array of timestamps.
      Parameters:
      timestamps - array of timestamps
      values - array of data values, same length as timestamps
  • Method Details

    • getPercentile

      double getPercentile(long tStart, long tEnd, double percentile)
      Calculates percentile value for data in time range.
      Parameters:
      tStart - start of the range, in seconds since the Unix epoch
      tEnd - end of the range, in seconds since the Unix epoch
      percentile - percentile to calculate (0-100)
      Returns:
      percentile value