Package com.google.api
Class Distribution
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
com.google.api.Distribution
- All Implemented Interfaces:
DistributionOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
public final class Distribution
extends com.google.protobuf.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- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class`BucketOptions` describes the bucket boundaries used to create a histogram for the distribution.static interfacestatic final class`Distribution` contains summary statistics for a population of values.static final classExemplars are example points that may be used to annotate aggregated distribution values.static interfacestatic final classThe range of the population values.static interfaceNested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessageV3
alwaysUseFieldBuilders, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanlonggetBucketCounts(int index) The number of values in each bucket of the histogram, as described in `bucket_options`.intThe number of values in each bucket of the histogram, as described in `bucket_options`.The number of values in each bucket of the histogram, as described in `bucket_options`.Defines the histogram bucket boundaries.Defines the histogram bucket boundaries.longgetCount()The number of values in the population.static Distributionstatic final com.google.protobuf.Descriptors.DescriptorgetExemplars(int index) Must be in increasing order of `value` field.intMust be in increasing order of `value` field.Must be in increasing order of `value` field.getExemplarsOrBuilder(int index) Must be in increasing order of `value` field.List<? extends Distribution.ExemplarOrBuilder>Must be in increasing order of `value` field.doublegetMean()The arithmetic mean of the values in the population.com.google.protobuf.Parser<Distribution>getRange()If specified, contains the range of the population values.If specified, contains the range of the population values.intdoubleThe sum of squared deviations from the mean of the values in the population.booleanDefines the histogram bucket boundaries.inthashCode()booleanhasRange()If specified, contains the range of the population values.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanstatic Distribution.Builderstatic Distribution.BuildernewBuilder(Distribution prototype) protected Distribution.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) static DistributionparseDelimitedFrom(InputStream input) static DistributionparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static DistributionparseFrom(byte[] data) static DistributionparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static DistributionparseFrom(com.google.protobuf.ByteString data) static DistributionparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static DistributionparseFrom(com.google.protobuf.CodedInputStream input) static DistributionparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static DistributionparseFrom(InputStream input) static DistributionparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static DistributionparseFrom(ByteBuffer data) static DistributionparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<Distribution>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, mergeFromAndMakeImmutableInternal, 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, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
COUNT_FIELD_NUMBER
public static final int COUNT_FIELD_NUMBER- See Also:
-
MEAN_FIELD_NUMBER
public static final int MEAN_FIELD_NUMBER- See Also:
-
SUM_OF_SQUARED_DEVIATION_FIELD_NUMBER
public static final int SUM_OF_SQUARED_DEVIATION_FIELD_NUMBER- See Also:
-
RANGE_FIELD_NUMBER
public static final int RANGE_FIELD_NUMBER- See Also:
-
BUCKET_OPTIONS_FIELD_NUMBER
public static final int BUCKET_OPTIONS_FIELD_NUMBER- See Also:
-
BUCKET_COUNTS_FIELD_NUMBER
public static final int BUCKET_COUNTS_FIELD_NUMBER- See Also:
-
EXEMPLARS_FIELD_NUMBER
public static final int EXEMPLARS_FIELD_NUMBER- See Also:
-
-
Method Details
-
newInstance
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getCount
public 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;- Specified by:
getCountin interfaceDistributionOrBuilder- Returns:
- The count.
-
getMean
public double getMean()The arithmetic mean of the values in the population. If `count` is zero then this field must be zero.
double mean = 2;- Specified by:
getMeanin interfaceDistributionOrBuilder- Returns:
- The mean.
-
getSumOfSquaredDeviation
public 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 232, 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;- Specified by:
getSumOfSquaredDeviationin interfaceDistributionOrBuilder- Returns:
- The sumOfSquaredDeviation.
-
hasRange
public 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;- Specified by:
hasRangein interfaceDistributionOrBuilder- Returns:
- Whether the range field is set.
-
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;- Specified by:
getRangein interfaceDistributionOrBuilder- Returns:
- The range.
-
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;- Specified by:
getRangeOrBuilderin interfaceDistributionOrBuilder
-
hasBucketOptions
public 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;- Specified by:
hasBucketOptionsin interfaceDistributionOrBuilder- Returns:
- Whether the bucketOptions field is set.
-
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;- Specified by:
getBucketOptionsin interfaceDistributionOrBuilder- Returns:
- The bucketOptions.
-
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;- Specified by:
getBucketOptionsOrBuilderin interfaceDistributionOrBuilder
-
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;- Specified by:
getBucketCountsListin interfaceDistributionOrBuilder- Returns:
- A list containing the bucketCounts.
-
getBucketCountsCount
public 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;- Specified by:
getBucketCountsCountin interfaceDistributionOrBuilder- Returns:
- The count of bucketCounts.
-
getBucketCounts
public 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;- Specified by:
getBucketCountsin interfaceDistributionOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The bucketCounts at the given index.
-
getExemplarsList
Must be in increasing order of `value` field.
repeated .google.api.Distribution.Exemplar exemplars = 10;- Specified by:
getExemplarsListin interfaceDistributionOrBuilder
-
getExemplarsOrBuilderList
Must be in increasing order of `value` field.
repeated .google.api.Distribution.Exemplar exemplars = 10;- Specified by:
getExemplarsOrBuilderListin interfaceDistributionOrBuilder
-
getExemplarsCount
public int getExemplarsCount()Must be in increasing order of `value` field.
repeated .google.api.Distribution.Exemplar exemplars = 10;- Specified by:
getExemplarsCountin interfaceDistributionOrBuilder
-
getExemplars
Must be in increasing order of `value` field.
repeated .google.api.Distribution.Exemplar exemplars = 10;- Specified by:
getExemplarsin interfaceDistributionOrBuilder
-
getExemplarsOrBuilder
Must be in increasing order of `value` field.
repeated .google.api.Distribution.Exemplar exemplars = 10;- Specified by:
getExemplarsOrBuilderin interfaceDistributionOrBuilder
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static Distribution parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Distribution parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Distribution parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Distribution parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Distribution parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Distribution parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Distribution parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static Distribution parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Distribution parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Distribution.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) - Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-