pub struct Distribution { /* private fields */ }Expand description
Exponential histogram distribution for high-performance metric recording.
Cells are pre-allocated and indexed by thread_id & mask, so recording is
lock-free with no per-call TLS bookkeeping.
Implementations§
Source§impl Distribution
impl Distribution
Sourcepub fn new(shard_count: usize) -> Self
pub fn new(shard_count: usize) -> Self
Create a new Distribution with shard_count shards.
The count is rounded up to the next power of two for fast modulo.
Sourcepub fn buckets_snapshot(&self) -> ExpBucketsSnapshot
pub fn buckets_snapshot(&self) -> ExpBucketsSnapshot
Merge bucket counts from all shards into a single snapshot.
Trait Implementations§
Source§impl Debug for Distribution
impl Debug for Distribution
Source§impl Default for Distribution
impl Default for Distribution
Source§impl DogStatsDExport for Distribution
impl DogStatsDExport for Distribution
Source§impl OtlpExport for Distribution
impl OtlpExport for Distribution
Source§impl PrometheusExport for Distribution
impl PrometheusExport 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 UnsafeUnpin 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
Mutably borrows from an owned value. Read more
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
Wrap the input message
T in a tonic::Request