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: i64The total number of samples in the distribution. Must be >= 0.
mean: f64The arithmetic mean of the samples in the distribution. If count is
zero then this field must be zero.
minimum: f64The minimum of the population of values. Ignored if count is zero.
maximum: f64The maximum of the population of values. Ignored if count is zero.
sum_of_squared_deviation: f64The 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
fn merge_field<B>(
&mut self,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext
) -> Result<(), DecodeError> where
B: Buf,
Returns the encoded length of the message without a length delimiter.
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
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError> where
Self: Default,
B: Buf,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError> where
Self: Default,
B: Buf,
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
impl RefUnwindSafe for Distribution
impl Send for Distribution
impl Sync for Distribution
impl Unpin for Distribution
impl UnwindSafe for Distribution
Blanket Implementations
Mutably borrows from an owned value. Read more
Wrap the input message T in a tonic::Request
pub fn vzip(self) -> V
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