Package io.opencensus.metrics.export
Class Distribution
java.lang.Object
io.opencensus.metrics.export.Distribution
- Direct Known Subclasses:
AutoValue_Distribution
Distribution
contains summary statistics for a population of values. It optionally
contains a histogram representing the distribution of those values across a set of buckets.- Since:
- 0.17
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
The histogram bucket of the population values.static class
The bucket options used to create a histogram for the distribution. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Distribution
create
(long count, double sum, double sumOfSquaredDeviations, Distribution.BucketOptions bucketOptions, List<Distribution.Bucket> buckets) Creates aDistribution
.abstract Distribution.BucketOptions
Returns bucket options used to create a histogram for the distribution.abstract List
<Distribution.Bucket> Returns the aggregated histogramDistribution.Bucket
s.abstract long
getCount()
Returns the aggregated count.abstract double
getSum()
Returns the aggregated sum.abstract double
Returns the aggregated sum of squared deviations.
-
Constructor Details
-
Distribution
Distribution()
-
-
Method Details
-
create
public static Distribution create(long count, double sum, double sumOfSquaredDeviations, Distribution.BucketOptions bucketOptions, List<Distribution.Bucket> buckets) Creates aDistribution
.- Parameters:
count
- the count of the population values.sum
- the sum of the population values.sumOfSquaredDeviations
- the sum of squared deviations of the population values.bucketOptions
- the bucket options used to create a histogram for the distribution.buckets
-Distribution.Bucket
s of a histogram.- Returns:
- a
Distribution
. - Since:
- 0.17
-
getCount
public abstract long getCount()Returns the aggregated count.- Returns:
- the aggregated count.
- Since:
- 0.17
-
getSum
public abstract double getSum()Returns the aggregated sum.- Returns:
- the aggregated sum.
- Since:
- 0.17
-
getSumOfSquaredDeviations
public abstract double getSumOfSquaredDeviations()Returns the aggregated sum of squared deviations.The sum of squared deviations from the mean of the values in the population. For values x_i this is:
Sum[i=1..n]((x_i - mean)^2)
If count is zero then this field must be zero.
- Returns:
- the aggregated sum of squared deviations.
- Since:
- 0.17
-
getBucketOptions
Returns bucket options used to create a histogram for the distribution.- Returns:
- the
BucketOptions
associated with theDistribution
, ornull
if there isn't one. - Since:
- 0.17
-
getBuckets
Returns the aggregated histogramDistribution.Bucket
s.- Returns:
- the aggregated histogram buckets.
- Since:
- 0.17
-