Class Distribution

  • All Implemented Interfaces:
    DistributionOrBuilder, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, java.io.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:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class 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  
      • Nested 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.GeneratedMessage.ExtendableMessage

        com.google.protobuf.GeneratedMessage.ExtendableMessage.ExtensionSerializer, com.google.protobuf.GeneratedMessage.ExtendableMessage.ExtensionWriter
      • Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage

        com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message,​T extends java.lang.Object>
      • Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

        com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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 com.google.protobuf.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.
      com.google.protobuf.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.
      boolean hasBucketOptions()
      Defines the histogram bucket boundaries.
      int hashCode()  
      boolean hasRange()
      If specified, contains the range of the population values.
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()  
      boolean isInitialized()  
      static Distribution.Builder newBuilder()  
      static Distribution.Builder newBuilder​(Distribution prototype)  
      Distribution.Builder newBuilderForType()  
      protected Distribution.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)  
      protected java.lang.Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)  
      static Distribution parseDelimitedFrom​(java.io.InputStream input)  
      static Distribution parseDelimitedFrom​(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static Distribution parseFrom​(byte[] data)  
      static Distribution parseFrom​(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static Distribution parseFrom​(com.google.protobuf.ByteString data)  
      static Distribution parseFrom​(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static Distribution parseFrom​(com.google.protobuf.CodedInputStream input)  
      static Distribution parseFrom​(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static Distribution parseFrom​(java.io.InputStream input)  
      static Distribution parseFrom​(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static Distribution parseFrom​(java.nio.ByteBuffer data)  
      static Distribution parseFrom​(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static com.google.protobuf.Parser<Distribution> parser()  
      Distribution.Builder toBuilder()  
      void writeTo​(com.google.protobuf.CodedOutputStream output)  
      • Methods inherited from class com.google.protobuf.GeneratedMessageV3

        mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBuilderForType
      • Methods inherited from class com.google.protobuf.GeneratedMessage.ExtendableMessage

        extensionsAreInitialized, extensionsSerializedSize, extensionsSerializedSizeAsMessageSet, getAllFields, getAllFieldsRaw, getExtension, getExtension, getExtensionCount, getExtensionFields, getField, getRepeatedField, getRepeatedFieldCount, hasExtension, hasField, newExtensionSerializer, newExtensionWriter, newMessageSetExtensionSerializer, newMessageSetExtensionWriter
      • Methods inherited from class com.google.protobuf.GeneratedMessage

        canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getDescriptorForType, getOneofFieldDescriptor, getUnknownFields, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
      • Methods inherited from class com.google.protobuf.AbstractMessage

        findInitializationErrors, getInitializationErrorString, hashFields, toString
      • Methods inherited from class com.google.protobuf.AbstractMessageLite

        addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface com.google.protobuf.MessageLite

        toByteArray, toByteString, writeDelimitedTo, writeTo
      • Methods inherited from interface com.google.protobuf.MessageOrBuilder

        findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
    • Method Detail

      • newInstance

        protected java.lang.Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Overrides:
        internalGetFieldAccessorTable in class com.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:
        getCount in interface DistributionOrBuilder
        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:
        getMean in interface DistributionOrBuilder
        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:
        getSumOfSquaredDeviation in interface DistributionOrBuilder
        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:
        hasRange in interface DistributionOrBuilder
        Returns:
        Whether the range field is set.
      • getRange

        public 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;
        Specified by:
        getRange in interface DistributionOrBuilder
        Returns:
        The range.
      • 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:
        hasBucketOptions in interface DistributionOrBuilder
        Returns:
        Whether the bucketOptions field is set.
      • getBucketOptions

        public 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;
        Specified by:
        getBucketOptions in interface DistributionOrBuilder
        Returns:
        The bucketOptions.
      • getBucketCountsList

        public 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;
        Specified by:
        getBucketCountsList in interface DistributionOrBuilder
        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:
        getBucketCountsCount in interface DistributionOrBuilder
        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:
        getBucketCounts in interface DistributionOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The bucketCounts at the given index.
      • getExemplarsCount

        public int getExemplarsCount()
         Must be in increasing order of `value` field.
         
        repeated .google.api.Distribution.Exemplar exemplars = 10;
        Specified by:
        getExemplarsCount in interface DistributionOrBuilder
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessage.ExtendableMessage<com.google.protobuf.GeneratedMessageV3>
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws java.io.IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessage
        Throws:
        java.io.IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessage
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static Distribution parseFrom​(java.nio.ByteBuffer data)
                                      throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Distribution parseFrom​(java.nio.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

        public static Distribution parseFrom​(java.io.InputStream input)
                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static Distribution parseFrom​(java.io.InputStream input,
                                             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

        public static Distribution parseDelimitedFrom​(java.io.InputStream input)
                                               throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

        public static Distribution parseDelimitedFrom​(java.io.InputStream input,
                                                      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                               throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static Distribution parseFrom​(com.google.protobuf.CodedInputStream input)
                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static Distribution parseFrom​(com.google.protobuf.CodedInputStream input,
                                             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • newBuilderForType

        public Distribution.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public Distribution.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected Distribution.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static Distribution getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<Distribution> parser()
      • getParserForType

        public com.google.protobuf.Parser<Distribution> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessage
      • getDefaultInstanceForType

        public Distribution getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder