java.lang.Object
org.rrd4j.data.Aggregator
Aggregates RRD data values over specified time periods.
Provides statistical aggregation functions for time-series data with configurable time steps and value arrays.
Provides statistical aggregation functions for time-series data with configurable time steps and value arrays.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final longTime step between data pointsprivate final long[]Timestamps for data pointsprivate final double[]Data valuesConstructor Summary
ConstructorsMethod Summary
All MethodsModifier and TypeMethodDescription(package private) doublegetPercentile(long tStart, long tEnd, double percentile) Calculates percentile value for data in time range.
Field Details
timestamps
private final long[] timestampsTimestamps for data pointsstep
private final long stepTime step between data pointsvalues
private final double[] valuesData values
Constructor Details
Aggregator
Aggregator(long[] timestamps, double[] values) Array of timestamps.- Parameters:
timestamps- array of timestampsvalues- 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 epochtEnd- end of the range, in seconds since the Unix epochpercentile- percentile to calculate (0-100)- Returns:
- percentile value