pub struct Histogram {
pub name: String,
pub count: u64,
pub sum_ns: u64,
pub min_ns: u64,
pub max_ns: u64,
pub buckets: [u64; 11],
}Expand description
Histogram primitive — exponential buckets (powers of 10) plus
sum/count/min/max. Deliberately minimalistic: no hdrhistogram
dependency, but [u64; 10] buckets for 1ns..10s in 10x steps.
For full p99/p999 resolution the consumer can use hdrhistogram
as a downstream sink — here we provide only the aggregate-free
summable format that maps directly to OTLP Histogram.
Fields§
§name: StringLogical name (e.g. "dds.write.latency").
count: u64Number of all records.
sum_ns: u64Sum of all records (in the unit; default: ns).
min_ns: u64Min value.
max_ns: u64Max value.
buckets: [u64; 11]Bucket counts: buckets[i] = how many records <= 10^i ns.
10 buckets for 1ns (10^0) to 10s (10^10).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Histogram
impl RefUnwindSafe for Histogram
impl Send for Histogram
impl Sync for Histogram
impl Unpin for Histogram
impl UnsafeUnpin for Histogram
impl UnwindSafe for Histogram
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