Class DistributionValue

  • All Implemented Interfaces:
    com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, DistributionValueOrBuilder, Serializable

    public final class DistributionValue
    extends com.google.protobuf.GeneratedMessageV3
    implements DistributionValueOrBuilder
     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.
     
    Protobuf type opencensus.proto.metrics.v1.DistributionValue
    See Also:
    Serialized Form
    • Method Detail

      • newInstance

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

        public final com.google.protobuf.UnknownFieldSet getUnknownFields()
        Specified by:
        getUnknownFields in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getUnknownFields in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        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 DistributionValueOrBuilder
        Returns:
        The count.
      • getSum

        public double getSum()
         The sum of the values in the population. If count is zero then this field
         must be zero.
         
        double sum = 2;
        Specified by:
        getSum in interface DistributionValueOrBuilder
        Returns:
        The sum.
      • 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 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;
        Specified by:
        getSumOfSquaredDeviation in interface DistributionValueOrBuilder
        Returns:
        The sumOfSquaredDeviation.
      • hasBucketOptions

        public boolean hasBucketOptions()
         Don't change bucket boundaries within a TimeSeries if your backend doesn't
         support this.
         TODO(issue #152): consider not required to send bucket options for
         optimization.
         
        .opencensus.proto.metrics.v1.DistributionValue.BucketOptions bucket_options = 4;
        Specified by:
        hasBucketOptions in interface DistributionValueOrBuilder
        Returns:
        Whether the bucketOptions field is set.
      • getBucketOptions

        public DistributionValue.BucketOptions getBucketOptions()
         Don't change bucket boundaries within a TimeSeries if your backend doesn't
         support this.
         TODO(issue #152): consider not required to send bucket options for
         optimization.
         
        .opencensus.proto.metrics.v1.DistributionValue.BucketOptions bucket_options = 4;
        Specified by:
        getBucketOptions in interface DistributionValueOrBuilder
        Returns:
        The bucketOptions.
      • getBucketsList

        public List<DistributionValue.Bucket> getBucketsList()
         If the distribution does not have a histogram, then omit this field.
         If there is a histogram, then the sum of the values in the Bucket counts
         must equal the value in the count field of the distribution.
         
        repeated .opencensus.proto.metrics.v1.DistributionValue.Bucket buckets = 5;
        Specified by:
        getBucketsList in interface DistributionValueOrBuilder
      • getBucketsOrBuilderList

        public List<? extends DistributionValue.BucketOrBuilder> getBucketsOrBuilderList()
         If the distribution does not have a histogram, then omit this field.
         If there is a histogram, then the sum of the values in the Bucket counts
         must equal the value in the count field of the distribution.
         
        repeated .opencensus.proto.metrics.v1.DistributionValue.Bucket buckets = 5;
        Specified by:
        getBucketsOrBuilderList in interface DistributionValueOrBuilder
      • getBucketsCount

        public int getBucketsCount()
         If the distribution does not have a histogram, then omit this field.
         If there is a histogram, then the sum of the values in the Bucket counts
         must equal the value in the count field of the distribution.
         
        repeated .opencensus.proto.metrics.v1.DistributionValue.Bucket buckets = 5;
        Specified by:
        getBucketsCount in interface DistributionValueOrBuilder
      • getBuckets

        public DistributionValue.Bucket getBuckets​(int index)
         If the distribution does not have a histogram, then omit this field.
         If there is a histogram, then the sum of the values in the Bucket counts
         must equal the value in the count field of the distribution.
         
        repeated .opencensus.proto.metrics.v1.DistributionValue.Bucket buckets = 5;
        Specified by:
        getBuckets in interface DistributionValueOrBuilder
      • getBucketsOrBuilder

        public DistributionValue.BucketOrBuilder getBucketsOrBuilder​(int index)
         If the distribution does not have a histogram, then omit this field.
         If there is a histogram, then the sum of the values in the Bucket counts
         must equal the value in the count field of the distribution.
         
        repeated .opencensus.proto.metrics.v1.DistributionValue.Bucket buckets = 5;
        Specified by:
        getBucketsOrBuilder in interface DistributionValueOrBuilder
      • isInitialized

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

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

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

        public boolean equals​(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 DistributionValue parseFrom​(ByteBuffer data)
                                           throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static DistributionValue parseFrom​(ByteBuffer data,
                                                  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                           throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static DistributionValue parseFrom​(com.google.protobuf.ByteString data)
                                           throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static DistributionValue parseFrom​(com.google.protobuf.ByteString data,
                                                  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                           throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static DistributionValue parseFrom​(byte[] data)
                                           throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static DistributionValue parseFrom​(byte[] data,
                                                  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                           throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

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

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

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

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

        public com.google.protobuf.Parser<DistributionValue> 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.GeneratedMessageV3
      • getDefaultInstanceForType

        public DistributionValue getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder