Struct histogram::CompactHistogram
source · pub struct CompactHistogram {
pub m: u32,
pub r: u32,
pub n: u32,
pub index: Vec<usize>,
pub count: Vec<u32>,
}
Expand description
A CompactHistogram
is a sparse, columnar representation of the
Histogram. It is significantly smaller than a regular Histogram
when a large number of buckets are zero, which is a frequent
occurence; consequently it is used as the serialization format
of the Histogram. It stores an individual vector for each field
of non-zero buckets. Assuming index[0] = n, (index[0], count[0])
corresponds to the nth bucket.
Fields§
§m: u32
parameters representing the resolution and the range of the histogram tracking request latencies
r: u32
§n: u32
§index: Vec<usize>
indices for the non-zero buckets in the histogram
count: Vec<u32>
histogram bucket counts corresponding to the indices
Trait Implementations§
source§impl Default for CompactHistogram
impl Default for CompactHistogram
source§fn default() -> CompactHistogram
fn default() -> CompactHistogram
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for CompactHistogram
impl<'de> Deserialize<'de> for CompactHistogram
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<&Histogram> for CompactHistogram
impl From<&Histogram> for CompactHistogram
source§impl Serialize for CompactHistogram
impl Serialize for CompactHistogram
Auto Trait Implementations§
impl RefUnwindSafe for CompactHistogram
impl Send for CompactHistogram
impl Sync for CompactHistogram
impl Unpin for CompactHistogram
impl UnwindSafe for CompactHistogram
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
Mutably borrows from an owned value. Read more