pub struct ClientStatsBucket { /* private fields */ }Expand description
A time bucket containing aggregated stats.
Stats are grouped into fixed-duration buckets (typically 10 seconds).
Implementations§
Source§impl ClientStatsBucket
impl ClientStatsBucket
Sourcepub fn new(start: u64, duration: u64, stats: Vec<ClientGroupedStats>) -> Self
pub fn new(start: u64, duration: u64, stats: Vec<ClientGroupedStats>) -> Self
Creates a new ClientStatsBucket with the given time range and stats.
Sourcepub fn with_agent_time_shift(self, agent_time_shift: i64) -> Self
pub fn with_agent_time_shift(self, agent_time_shift: i64) -> Self
Sets the agent time shift.
Sourcepub fn stats(&self) -> &[ClientGroupedStats]
pub fn stats(&self) -> &[ClientGroupedStats]
Returns the grouped stats within this bucket.
Sourcepub fn stats_mut(&mut self) -> &mut Vec<ClientGroupedStats>
pub fn stats_mut(&mut self) -> &mut Vec<ClientGroupedStats>
Returns a mutable reference to the grouped stats within this bucket.
Sourcepub fn agent_time_shift(&self) -> i64
pub fn agent_time_shift(&self) -> i64
Returns the agent time shift.
Trait Implementations§
Source§impl Clone for ClientStatsBucket
impl Clone for ClientStatsBucket
Source§fn clone(&self) -> ClientStatsBucket
fn clone(&self) -> ClientStatsBucket
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ClientStatsBucket
impl Debug for ClientStatsBucket
Source§impl Default for ClientStatsBucket
impl Default for ClientStatsBucket
Source§fn default() -> ClientStatsBucket
fn default() -> ClientStatsBucket
Returns the “default value” for a type. Read more
Source§impl PartialEq for ClientStatsBucket
impl PartialEq for ClientStatsBucket
impl StructuralPartialEq for ClientStatsBucket
Auto Trait Implementations§
impl Freeze for ClientStatsBucket
impl RefUnwindSafe for ClientStatsBucket
impl Send for ClientStatsBucket
impl Sync for ClientStatsBucket
impl Unpin for ClientStatsBucket
impl UnwindSafe for ClientStatsBucket
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Track for T
impl<T> Track for T
§fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self>
fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self>
Instruments this type by attaching the given allocation group token, returning a
Tracked wrapper. Read more§fn in_current_allocation_group(self) -> Tracked<Self>
fn in_current_allocation_group(self) -> Tracked<Self>
Instruments this type by attaching the current allocation group, returning a
Tracked wrapper. Read more