Enum google_api_proto::google::api::servicecontrol::v1::distribution::BucketOption
source · pub enum BucketOption {
LinearBuckets(LinearBuckets),
ExponentialBuckets(ExponentialBuckets),
ExplicitBuckets(ExplicitBuckets),
}
Expand description
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.
Variants§
LinearBuckets(LinearBuckets)
Buckets with constant width.
ExponentialBuckets(ExponentialBuckets)
Buckets with exponentially growing width.
ExplicitBuckets(ExplicitBuckets)
Buckets with arbitrary user-provided width.
Implementations§
source§impl BucketOption
impl BucketOption
sourcepub fn merge(
field: &mut Option<BucketOption>,
tag: u32,
wire_type: WireType,
buf: &mut impl Buf,
ctx: DecodeContext,
) -> Result<(), DecodeError>
pub fn merge( field: &mut Option<BucketOption>, tag: u32, wire_type: WireType, buf: &mut impl Buf, ctx: DecodeContext, ) -> Result<(), DecodeError>
Decodes an instance of the message from a buffer, and merges it into self.
sourcepub fn encoded_len(&self) -> usize
pub fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Trait Implementations§
source§impl Clone for BucketOption
impl Clone for BucketOption
source§fn clone(&self) -> BucketOption
fn clone(&self) -> BucketOption
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for BucketOption
impl Debug for BucketOption
source§impl PartialEq for BucketOption
impl PartialEq for BucketOption
source§fn eq(&self, other: &BucketOption) -> bool
fn eq(&self, other: &BucketOption) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for BucketOption
Auto Trait Implementations§
impl Freeze for BucketOption
impl RefUnwindSafe for BucketOption
impl Send for BucketOption
impl Sync for BucketOption
impl Unpin for BucketOption
impl UnwindSafe for BucketOption
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