Struct googapis::google::api::servicecontrol::v1::Distribution[][src]

pub struct Distribution {
    pub count: i64,
    pub mean: f64,
    pub minimum: f64,
    pub maximum: f64,
    pub sum_of_squared_deviation: f64,
    pub bucket_counts: Vec<i64>,
    pub exemplars: Vec<Exemplar>,
    pub bucket_option: Option<BucketOption>,
}
Expand description

Distribution represents a frequency distribution of double-valued sample points. It contains the size of the population of sample points plus additional optional information:

  • the arithmetic mean of the samples
  • the minimum and maximum of the samples
  • the sum-squared-deviation of the samples, used to compute variance
  • a histogram of the values of the sample points

Fields

count: i64

The total number of samples in the distribution. Must be >= 0.

mean: f64

The arithmetic mean of the samples in the distribution. If count is zero then this field must be zero.

minimum: f64

The minimum of the population of values. Ignored if count is zero.

maximum: f64

The maximum of the population of values. Ignored if count is zero.

sum_of_squared_deviation: f64

The sum of squared deviations from the mean: Sum[i=1..count]((x_i - mean)^2) where each x_i is a sample values. If count is zero then this field must be zero, otherwise validation of the request fails.

bucket_counts: Vec<i64>

The number of samples in each histogram bucket. bucket_counts are optional. If present, they must sum to the count value.

The buckets are defined below in bucket_option. There are N buckets. bucket_counts\[0\] is the number of samples in the underflow bucket. bucket_counts\[1\] to bucket_counts\[N-1\] are the numbers of samples in each of the finite buckets. And bucket_counts\[N\] is the number of samples in the overflow bucket. See the comments of bucket_option` below for more details.

Any suffix of trailing zeros may be omitted.

exemplars: Vec<Exemplar>

Example points. Must be in increasing order of value field.

bucket_option: Option<BucketOption>

Defines the buckets in the histogram. bucket_option and bucket_counts must be both set, or both unset.

Buckets are numbered in the range of [0, N], with a total of N+1 buckets. There must be at least two buckets (a single-bucket histogram gives no information that isn’t already provided by count).

The first bucket is the underflow bucket which has a lower bound of -inf. The last bucket is the overflow bucket which has an upper bound of +inf. All other buckets (if any) are called “finite” buckets because they have finite lower and upper bounds. As described below, there are three ways to define the finite buckets.

(1) Buckets with constant width. (2) Buckets with exponentially growing widths. (3) Buckets with arbitrary user-provided widths.

In all cases, the buckets cover the entire real number line (-inf, +inf). Bucket upper bounds are exclusive and lower bounds are inclusive. The upper bound of the underflow bucket is equal to the lower bound of the smallest finite bucket; the lower bound of the overflow bucket is equal to the upper bound of the largest finite bucket.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Returns the encoded length of the message without a length delimiter.

Clears the message, resetting all fields to their default.

Encodes the message to a buffer. Read more

Encodes the message to a newly allocated buffer.

Encodes the message with a length-delimiter to a buffer. Read more

Encodes the message with a length-delimiter to a newly allocated buffer.

Decodes an instance of the message from a buffer. Read more

Decodes a length-delimited instance of the message from the buffer.

Decodes an instance of the message from a buffer, and merges it into self. Read more

Decodes a length-delimited instance of the message from buffer, and merges it into self. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Wrap the input message T in a tonic::Request

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more