Struct google_api_proto::google::api::servicecontrol::v1::Distribution
source · 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§
source§impl Clone for Distribution
impl Clone for Distribution
source§fn clone(&self) -> Distribution
fn clone(&self) -> Distribution
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for Distribution
impl Debug for Distribution
source§impl Default for Distribution
impl Default for Distribution
source§impl Message for Distribution
impl Message for Distribution
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for Distribution
impl PartialEq for Distribution
source§fn eq(&self, other: &Distribution) -> bool
fn eq(&self, other: &Distribution) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for Distribution
Auto Trait Implementations§
impl Freeze for Distribution
impl RefUnwindSafe for Distribution
impl Send for Distribution
impl Sync for Distribution
impl Unpin for Distribution
impl UnwindSafe for Distribution
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request