Package io.opencensus.implcore.stats
Class MutableAggregation.MutableDistribution
- java.lang.Object
-
- io.opencensus.implcore.stats.MutableAggregation
-
- io.opencensus.implcore.stats.MutableAggregation.MutableDistribution
-
- Enclosing class:
- MutableAggregation
static final class MutableAggregation.MutableDistribution extends MutableAggregation
Calculate distribution stats on aggregatedMeasureValues.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.opencensus.implcore.stats.MutableAggregation
MutableAggregation.MutableCount, MutableAggregation.MutableDistribution, MutableAggregation.MutableLastValueDouble, MutableAggregation.MutableLastValueLong, MutableAggregation.MutableMean, MutableAggregation.MutableSumDouble, MutableAggregation.MutableSumLong
-
-
Field Summary
Fields Modifier and Type Field Description private BucketBoundariesbucketBoundariesprivate long[]bucketCountsprivate longcountprivate Exemplar[]exemplarsprivate doublemeanprivate doublesumprivate doublesumOfSquaredDeviations
-
Constructor Summary
Constructors Modifier Constructor Description privateMutableDistribution(BucketBoundaries bucketBoundaries)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidadd(double value, java.util.Map<java.lang.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.MutableDistributioncreate(BucketBoundaries bucketBoundaries)Construct aMutableDistribution.(package private) BucketBoundariesgetBucketBoundaries()(package private) long[]getBucketCounts()(package private) longgetCount()(package private) Exemplar[]getExemplars()(package private) doublegetMean()(package private) doublegetSumOfSquaredDeviations()(package private) AggregationDatatoAggregationData()(package private) PointtoPoint(Timestamp timestamp)
-
-
-
Field Detail
-
sum
private double sum
-
mean
private double mean
-
count
private long count
-
sumOfSquaredDeviations
private double sumOfSquaredDeviations
-
bucketBoundaries
private final BucketBoundaries bucketBoundaries
-
bucketCounts
private final long[] bucketCounts
-
exemplars
@Nullable private final Exemplar[] exemplars
-
-
Constructor Detail
-
MutableDistribution
private MutableDistribution(BucketBoundaries bucketBoundaries)
-
-
Method Detail
-
create
static MutableAggregation.MutableDistribution create(BucketBoundaries bucketBoundaries)
Construct aMutableDistribution.- Returns:
- an empty
MutableDistribution.
-
add
void add(double value, java.util.Map<java.lang.String,AttachmentValue> attachments, Timestamp timestamp)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
void combine(MutableAggregation other, double fraction)
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
Point toPoint(Timestamp timestamp)
- Specified by:
toPointin classMutableAggregation
-
getMean
double getMean()
-
getCount
long getCount()
-
getSumOfSquaredDeviations
double getSumOfSquaredDeviations()
-
getBucketCounts
long[] getBucketCounts()
-
getBucketBoundaries
BucketBoundaries getBucketBoundaries()
-
getExemplars
@Nullable Exemplar[] getExemplars()
-
-