Class LongStats
java.lang.Object
io.nosqlbench.virtdata.library.basics.shared.statistics.LongStats
- All Implemented Interfaces:
DoubleUnaryOperator
Provide a moving aggregate (min,max,avg,sum,count) of long values presented.
This allows for sanity checks on values during prototyping, primarily.
Using it for other purposes in actual workloads is not generally desirable,
as this does not produce purely functional (deterministic) values.
-
Constructor Summary
ConstructorsConstructorDescriptionGiven the specified statistic, provide an updated result for all the values presented to this function's input.Given the specified statistic, a function, and whether to allow truncating conversions, provide an updated result for all the values produced by the provided function when given the input. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.DoubleUnaryOperator
andThen, compose
-
Constructor Details
-
LongStats
Given the specified statistic, provide an updated result for all the values presented to this function's input.- Parameters:
spec- One of 'min', 'max', 'count', 'avg', or 'sum'
-
LongStats
Given the specified statistic, a function, and whether to allow truncating conversions, provide an updated result for all the values produced by the provided function when given the input.- Parameters:
spec- One of 'min', 'max', 'count', 'avg', or 'sum'func- Any function which can take a long or compatible input and produce a numeric valuetruncate- Whether or not to allow truncating conversions (long to int for example)
-
-
Method Details
-
applyAsDouble
public double applyAsDouble(double operand) - Specified by:
applyAsDoublein interfaceDoubleUnaryOperator
-