Package org.jrobin.data
Class PercentileDef
- java.lang.Object
-
- org.jrobin.data.Source
-
- org.jrobin.data.PercentileDef
-
- All Implemented Interfaces:
ConsolFuns
public class PercentileDef extends Source
-
-
Field Summary
-
Fields inherited from class org.jrobin.data.Source
timestamps, values
-
Fields inherited from interface org.jrobin.core.ConsolFuns
CF_AVERAGE, CF_FIRST, CF_LAST, CF_MAX, CF_MIN, CF_TOTAL
-
-
Constructor Summary
Constructors Constructor Description PercentileDef(String name, Source source, double percentile)
PercentileDef(String name, Source source, double percentile, boolean ignorenan)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
calculate(long tStart, long tEnd)
Realize the calculation of this definition, over the given time period(package private) Aggregates
getAggregates(long tStart, long tEnd)
Same as SDef; the aggregates of a static value are all just the same static value.(package private) double
getPercentile(long tStart, long tEnd, double percentile)
Returns just the calculated percentile; the "Xth" percentile of a static value is the static value itself.(package private) void
setTimestamps(long[] timestamps)
-
Methods inherited from class org.jrobin.data.Source
getName, getPercentile, getTimestamps, getValues, setValues
-
-
-
-
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 starttEnd
- 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 classSource
-
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 classSource
- 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 classSource
- Throws:
RrdException
-
-