public final class Distribution extends GeneratedMessageV3 implements DistributionOrBuilder
`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. The summary statistics are the count, mean, sum of the squared deviation from the mean, the minimum, and the maximum of the set of population of values. The histogram is based on a sequence of buckets and gives a count of values that fall into each bucket. The boundaries of the buckets are given either explicitly or by formulas for buckets of fixed or exponentially increasing widths. Although it is not forbidden, it is generally a bad idea to include non-finite values (infinities or NaNs) in the population of values, as this will render the `mean` and `sum_of_squared_deviation` fields meaningless.Protobuf type
google.api.Distribution| Modifier and Type | Class and Description |
|---|---|
static class |
Distribution.BucketOptions
`BucketOptions` describes the bucket boundaries used to create a histogram
for the distribution.
|
static interface |
Distribution.BucketOptionsOrBuilder |
static class |
Distribution.Builder
`Distribution` contains summary statistics for a population of values.
|
static class |
Distribution.Exemplar
Exemplars are example points that may be used to annotate aggregated
distribution values.
|
static interface |
Distribution.ExemplarOrBuilder |
static class |
Distribution.Range
The range of the population values.
|
static interface |
Distribution.RangeOrBuilder |
GeneratedMessageV3.BuilderParent, GeneratedMessageV3.ExtendableBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage,BuilderType extends GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, GeneratedMessageV3.ExtendableMessage<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.FieldAccessorTable| Modifier and Type | Field and Description |
|---|---|
static int |
BUCKET_COUNTS_FIELD_NUMBER |
static int |
BUCKET_OPTIONS_FIELD_NUMBER |
static int |
COUNT_FIELD_NUMBER |
static int |
EXEMPLARS_FIELD_NUMBER |
static int |
MEAN_FIELD_NUMBER |
static int |
RANGE_FIELD_NUMBER |
static int |
SUM_OF_SQUARED_DEVIATION_FIELD_NUMBER |
alwaysUseFieldBuilders, unknownFieldsmemoizedSizememoizedHashCode| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
long |
getBucketCounts(int index)
The number of values in each bucket of the histogram, as described in
`bucket_options`.
|
int |
getBucketCountsCount()
The number of values in each bucket of the histogram, as described in
`bucket_options`.
|
java.util.List<java.lang.Long> |
getBucketCountsList()
The number of values in each bucket of the histogram, as described in
`bucket_options`.
|
Distribution.BucketOptions |
getBucketOptions()
Defines the histogram bucket boundaries.
|
Distribution.BucketOptionsOrBuilder |
getBucketOptionsOrBuilder()
Defines the histogram bucket boundaries.
|
long |
getCount()
The number of values in the population.
|
static Distribution |
getDefaultInstance() |
Distribution |
getDefaultInstanceForType() |
static Descriptors.Descriptor |
getDescriptor() |
Distribution.Exemplar |
getExemplars(int index)
Must be in increasing order of `value` field.
|
int |
getExemplarsCount()
Must be in increasing order of `value` field.
|
java.util.List<Distribution.Exemplar> |
getExemplarsList()
Must be in increasing order of `value` field.
|
Distribution.ExemplarOrBuilder |
getExemplarsOrBuilder(int index)
Must be in increasing order of `value` field.
|
java.util.List<? extends Distribution.ExemplarOrBuilder> |
getExemplarsOrBuilderList()
Must be in increasing order of `value` field.
|
double |
getMean()
The arithmetic mean of the values in the population.
|
Parser<Distribution> |
getParserForType() |
Distribution.Range |
getRange()
If specified, contains the range of the population values.
|
Distribution.RangeOrBuilder |
getRangeOrBuilder()
If specified, contains the range of the population values.
|
int |
getSerializedSize() |
double |
getSumOfSquaredDeviation()
The sum of squared deviations from the mean of the values in the
population.
|
UnknownFieldSet |
getUnknownFields() |
boolean |
hasBucketOptions()
Defines the histogram bucket boundaries.
|
int |
hashCode() |
boolean |
hasRange()
If specified, contains the range of the population values.
|
protected GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static Distribution.Builder |
newBuilder() |
static Distribution.Builder |
newBuilder(Distribution prototype) |
Distribution.Builder |
newBuilderForType() |
protected Distribution.Builder |
newBuilderForType(GeneratedMessageV3.BuilderParent parent) |
static Distribution |
parseDelimitedFrom(java.io.InputStream input) |
static Distribution |
parseDelimitedFrom(java.io.InputStream input,
ExtensionRegistryLite extensionRegistry) |
static Distribution |
parseFrom(byte[] data) |
static Distribution |
parseFrom(byte[] data,
ExtensionRegistryLite extensionRegistry) |
static Distribution |
parseFrom(java.nio.ByteBuffer data) |
static Distribution |
parseFrom(java.nio.ByteBuffer data,
ExtensionRegistryLite extensionRegistry) |
static Distribution |
parseFrom(ByteString data) |
static Distribution |
parseFrom(ByteString data,
ExtensionRegistryLite extensionRegistry) |
static Distribution |
parseFrom(CodedInputStream input) |
static Distribution |
parseFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry) |
static Distribution |
parseFrom(java.io.InputStream input) |
static Distribution |
parseFrom(java.io.InputStream input,
ExtensionRegistryLite extensionRegistry) |
static Parser<Distribution> |
parser() |
Distribution.Builder |
toBuilder() |
void |
writeTo(CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitfindInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneoftoByteArray, toByteString, writeDelimitedTo, writeTopublic static final int COUNT_FIELD_NUMBER
public static final int MEAN_FIELD_NUMBER
public static final int SUM_OF_SQUARED_DEVIATION_FIELD_NUMBER
public static final int RANGE_FIELD_NUMBER
public static final int BUCKET_OPTIONS_FIELD_NUMBER
public static final int BUCKET_COUNTS_FIELD_NUMBER
public static final int EXEMPLARS_FIELD_NUMBER
public final UnknownFieldSet getUnknownFields()
getUnknownFields in interface MessageOrBuildergetUnknownFields in class GeneratedMessageV3public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class GeneratedMessageV3public long getCount()
The number of values in the population. Must be non-negative. This value must equal the sum of the values in `bucket_counts` if a histogram is provided.
int64 count = 1;getCount in interface DistributionOrBuilderpublic double getMean()
The arithmetic mean of the values in the population. If `count` is zero then this field must be zero.
double mean = 2;getMean in interface DistributionOrBuilderpublic double getSumOfSquaredDeviation()
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)
Knuth, "The Art of Computer Programming", Vol. 2, page 323, 3rd edition
describes Welford's method for accumulating this sum in one pass.
If `count` is zero then this field must be zero.
double sum_of_squared_deviation = 3;getSumOfSquaredDeviation in interface DistributionOrBuilderpublic boolean hasRange()
If specified, contains the range of the population values. The field must not be present if the `count` is zero.
.google.api.Distribution.Range range = 4;hasRange in interface DistributionOrBuilderpublic Distribution.Range getRange()
If specified, contains the range of the population values. The field must not be present if the `count` is zero.
.google.api.Distribution.Range range = 4;getRange in interface DistributionOrBuilderpublic Distribution.RangeOrBuilder getRangeOrBuilder()
If specified, contains the range of the population values. The field must not be present if the `count` is zero.
.google.api.Distribution.Range range = 4;getRangeOrBuilder in interface DistributionOrBuilderpublic boolean hasBucketOptions()
Defines the histogram bucket boundaries. If the distribution does not contain a histogram, then omit this field.
.google.api.Distribution.BucketOptions bucket_options = 6;hasBucketOptions in interface DistributionOrBuilderpublic Distribution.BucketOptions getBucketOptions()
Defines the histogram bucket boundaries. If the distribution does not contain a histogram, then omit this field.
.google.api.Distribution.BucketOptions bucket_options = 6;getBucketOptions in interface DistributionOrBuilderpublic Distribution.BucketOptionsOrBuilder getBucketOptionsOrBuilder()
Defines the histogram bucket boundaries. If the distribution does not contain a histogram, then omit this field.
.google.api.Distribution.BucketOptions bucket_options = 6;getBucketOptionsOrBuilder in interface DistributionOrBuilderpublic java.util.List<java.lang.Long> getBucketCountsList()
The number of values in each bucket of the histogram, as described in `bucket_options`. If the distribution does not have a histogram, then omit this field. If there is a histogram, then the sum of the values in `bucket_counts` must equal the value in the `count` field of the distribution. If present, `bucket_counts` should contain N values, where N is the number of buckets specified in `bucket_options`. If you supply fewer than N values, the remaining values are assumed to be 0. The order of the values in `bucket_counts` follows the bucket numbering schemes described for the three bucket types. The first value must be the count for the underflow bucket (number 0). The next N-2 values are the counts for the finite buckets (number 1 through N-2). The N'th value in `bucket_counts` is the count for the overflow bucket (number N-1).
repeated int64 bucket_counts = 7;getBucketCountsList in interface DistributionOrBuilderpublic int getBucketCountsCount()
The number of values in each bucket of the histogram, as described in `bucket_options`. If the distribution does not have a histogram, then omit this field. If there is a histogram, then the sum of the values in `bucket_counts` must equal the value in the `count` field of the distribution. If present, `bucket_counts` should contain N values, where N is the number of buckets specified in `bucket_options`. If you supply fewer than N values, the remaining values are assumed to be 0. The order of the values in `bucket_counts` follows the bucket numbering schemes described for the three bucket types. The first value must be the count for the underflow bucket (number 0). The next N-2 values are the counts for the finite buckets (number 1 through N-2). The N'th value in `bucket_counts` is the count for the overflow bucket (number N-1).
repeated int64 bucket_counts = 7;getBucketCountsCount in interface DistributionOrBuilderpublic long getBucketCounts(int index)
The number of values in each bucket of the histogram, as described in `bucket_options`. If the distribution does not have a histogram, then omit this field. If there is a histogram, then the sum of the values in `bucket_counts` must equal the value in the `count` field of the distribution. If present, `bucket_counts` should contain N values, where N is the number of buckets specified in `bucket_options`. If you supply fewer than N values, the remaining values are assumed to be 0. The order of the values in `bucket_counts` follows the bucket numbering schemes described for the three bucket types. The first value must be the count for the underflow bucket (number 0). The next N-2 values are the counts for the finite buckets (number 1 through N-2). The N'th value in `bucket_counts` is the count for the overflow bucket (number N-1).
repeated int64 bucket_counts = 7;getBucketCounts in interface DistributionOrBuilderpublic java.util.List<Distribution.Exemplar> getExemplarsList()
Must be in increasing order of `value` field.
repeated .google.api.Distribution.Exemplar exemplars = 10;getExemplarsList in interface DistributionOrBuilderpublic java.util.List<? extends Distribution.ExemplarOrBuilder> getExemplarsOrBuilderList()
Must be in increasing order of `value` field.
repeated .google.api.Distribution.Exemplar exemplars = 10;getExemplarsOrBuilderList in interface DistributionOrBuilderpublic int getExemplarsCount()
Must be in increasing order of `value` field.
repeated .google.api.Distribution.Exemplar exemplars = 10;getExemplarsCount in interface DistributionOrBuilderpublic Distribution.Exemplar getExemplars(int index)
Must be in increasing order of `value` field.
repeated .google.api.Distribution.Exemplar exemplars = 10;getExemplars in interface DistributionOrBuilderpublic Distribution.ExemplarOrBuilder getExemplarsOrBuilder(int index)
Must be in increasing order of `value` field.
repeated .google.api.Distribution.Exemplar exemplars = 10;getExemplarsOrBuilder in interface DistributionOrBuilderpublic final boolean isInitialized()
isInitialized in interface MessageLiteOrBuilderisInitialized in class GeneratedMessageV3public void writeTo(CodedOutputStream output) throws java.io.IOException
writeTo in interface MessageLitewriteTo in class GeneratedMessageV3java.io.IOExceptionpublic int getSerializedSize()
getSerializedSize in interface MessageLitegetSerializedSize in class GeneratedMessageV3public boolean equals(java.lang.Object obj)
equals in interface Messageequals in class AbstractMessagepublic int hashCode()
hashCode in interface MessagehashCode in class AbstractMessagepublic static Distribution parseFrom(java.nio.ByteBuffer data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Distribution parseFrom(java.nio.ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Distribution parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Distribution parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Distribution parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Distribution parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Distribution parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static Distribution parseFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static Distribution parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static Distribution parseDelimitedFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static Distribution parseFrom(CodedInputStream input) throws java.io.IOException
java.io.IOExceptionpublic static Distribution parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic Distribution.Builder newBuilderForType()
newBuilderForType in interface MessagenewBuilderForType in interface MessageLitepublic static Distribution.Builder newBuilder()
public static Distribution.Builder newBuilder(Distribution prototype)
public Distribution.Builder toBuilder()
toBuilder in interface MessagetoBuilder in interface MessageLiteprotected Distribution.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class GeneratedMessageV3public static Distribution getDefaultInstance()
public static Parser<Distribution> parser()
public Parser<Distribution> getParserForType()
getParserForType in interface MessagegetParserForType in interface MessageLitegetParserForType in class GeneratedMessageV3public Distribution getDefaultInstanceForType()
getDefaultInstanceForType in interface MessageLiteOrBuildergetDefaultInstanceForType in interface MessageOrBuilder