pub struct LatencyHistogram { /* private fields */ }Expand description
HDR histogram for recording request latencies.
Records durations in microseconds. Covers 1µs to 1 hour at 3 significant digits of precision. Provides exact quantile queries with bounded error.
Implementations§
Source§impl LatencyHistogram
impl LatencyHistogram
Sourcepub fn quantile_ms(&self, q: f64) -> f64
pub fn quantile_ms(&self, q: f64) -> f64
Returns the value at quantile q (0.0–1.0) in milliseconds.
Sourcepub fn total_count(&self) -> u64
pub fn total_count(&self) -> u64
Returns the total number of recorded values.
Sourcepub fn iter_recorded_us(&self) -> impl Iterator<Item = (u64, u64)> + '_
pub fn iter_recorded_us(&self) -> impl Iterator<Item = (u64, u64)> + '_
Returns (value_us, count) pairs for all recorded distinct values.
Used by the CLI to render the latency bar chart.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LatencyHistogram
impl RefUnwindSafe for LatencyHistogram
impl Send for LatencyHistogram
impl Sync for LatencyHistogram
impl Unpin for LatencyHistogram
impl UnsafeUnpin for LatencyHistogram
impl UnwindSafe for LatencyHistogram
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