Class MutableAggregation.MutableMean
java.lang.Object
io.opencensus.implcore.stats.MutableAggregation
io.opencensus.implcore.stats.MutableAggregation.MutableMean
- Enclosing class:
MutableAggregation
Calculate mean on aggregated
MeasureValues.-
Nested Class Summary
Nested classes/interfaces inherited from class MutableAggregation
MutableAggregation.MutableCount, MutableAggregation.MutableDistribution, MutableAggregation.MutableLastValueDouble, MutableAggregation.MutableLastValueLong, MutableAggregation.MutableMean, MutableAggregation.MutableSumDouble, MutableAggregation.MutableSumLong -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidadd(double value, Map<String, AttachmentValue> attachments, Timestamp timestamp) Put a new value into the MutableAggregation.(package private) voidcombine(MutableAggregation other, double fraction) Combine the internal values of this MutableAggregation and value of the given MutableAggregation, with the given fraction.(package private) static MutableAggregation.MutableMeancreate()Construct aMutableMean.(package private) longgetCount()Returns the aggregated count.(package private) doublegetMean()Returns the aggregated mean.(package private) doublegetSum()(package private) AggregationData(package private) Point
-
Field Details
-
sum
private double sum -
count
private long count
-
-
Constructor Details
-
MutableMean
private MutableMean()
-
-
Method Details
-
create
Construct aMutableMean.- Returns:
- an empty
MutableMean.
-
add
Description copied from class:MutableAggregationPut a new value into the MutableAggregation.- Specified by:
addin classMutableAggregation- Parameters:
value- new value to be added to populationattachments- the contextual information on anExemplartimestamp- the timestamp when the value is recorded
-
combine
Description copied from class:MutableAggregationCombine the internal values of this MutableAggregation and value of the given MutableAggregation, with the given fraction. Then set the internal value of this MutableAggregation to the combined value.- Specified by:
combinein classMutableAggregation- Parameters:
other- the otherMutableAggregation. The type of this and otherMutableAggregationmust match.fraction- the fraction that the value in otherMutableAggregationshould contribute. Must be within [0.0, 1.0].
-
toAggregationData
AggregationData toAggregationData()- Specified by:
toAggregationDatain classMutableAggregation
-
toPoint
- Specified by:
toPointin classMutableAggregation
-
getMean
double getMean()Returns the aggregated mean.- Returns:
- the aggregated mean.
-
getCount
long getCount()Returns the aggregated count.- Returns:
- the aggregated count.
-
getSum
double getSum()
-