pub struct WorkerMetrics {
pub initialization_time: Duration,
pub average_message_latency: Duration,
pub max_message_latency: Duration,
pub messages_processed: u64,
pub messages_dropped: u64,
pub memory_start: u64,
pub memory_end: u64,
pub error_recoveries: u32,
}Expand description
Worker performance metrics
Fields§
§initialization_time: DurationTime to initialize worker
average_message_latency: DurationAverage message round-trip latency
max_message_latency: DurationMaximum message latency observed
messages_processed: u64Total messages processed
messages_dropped: u64Messages dropped (if any)
memory_start: u64Memory at start (bytes)
memory_end: u64Memory at end (bytes)
error_recoveries: u32Number of error recoveries
Implementations§
Source§impl WorkerMetrics
impl WorkerMetrics
Sourcepub fn has_memory_leak(&self) -> bool
pub fn has_memory_leak(&self) -> bool
Check if there’s a memory leak (>10% growth)
Sourcepub fn memory_growth(&self) -> i64
pub fn memory_growth(&self) -> i64
Get memory growth in bytes
Trait Implementations§
Source§impl Clone for WorkerMetrics
impl Clone for WorkerMetrics
Source§fn clone(&self) -> WorkerMetrics
fn clone(&self) -> WorkerMetrics
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 WorkerMetrics
impl Debug for WorkerMetrics
Source§impl Default for WorkerMetrics
impl Default for WorkerMetrics
Source§fn default() -> WorkerMetrics
fn default() -> WorkerMetrics
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for WorkerMetrics
impl RefUnwindSafe for WorkerMetrics
impl Send for WorkerMetrics
impl Sync for WorkerMetrics
impl Unpin for WorkerMetrics
impl UnsafeUnpin for WorkerMetrics
impl UnwindSafe for WorkerMetrics
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().