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 aggregated MeasureValues.
  • Field Details

    • 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 Details

    • MutableDistribution

      private MutableDistribution(BucketBoundaries bucketBoundaries)
  • Method Details

    • create

      static MutableAggregation.MutableDistribution create(BucketBoundaries bucketBoundaries)
      Construct a MutableDistribution.
      Returns:
      an empty MutableDistribution.
    • add

      void add(double value, Map<String,AttachmentValue> attachments, Timestamp timestamp)
      Description copied from class: MutableAggregation
      Put a new value into the MutableAggregation.
      Specified by:
      add in class MutableAggregation
      Parameters:
      value - new value to be added to population
      attachments - the contextual information on an Exemplar
      timestamp - the timestamp when the value is recorded
    • combine

      void combine(MutableAggregation other, double fraction)
      Description copied from class: MutableAggregation
      Combine 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:
      combine in class MutableAggregation
      Parameters:
      other - the other MutableAggregation. The type of this and other MutableAggregation must match.
      fraction - the fraction that the value in other MutableAggregation should contribute. Must be within [0.0, 1.0].
    • toAggregationData

      AggregationData toAggregationData()
      Specified by:
      toAggregationData in class MutableAggregation
    • toPoint

      Point toPoint(Timestamp timestamp)
      Specified by:
      toPoint in class MutableAggregation
    • getMean

      double getMean()
    • getCount

      long getCount()
    • getSumOfSquaredDeviations

      double getSumOfSquaredDeviations()
    • getBucketCounts

      long[] getBucketCounts()
    • getBucketBoundaries

      BucketBoundaries getBucketBoundaries()
    • getExemplars

      @Nullable Exemplar[] getExemplars()