#[non_exhaustive]pub struct WorkerMetrics {
pub id: WorkerId,
pub items: u64,
pub active_connections: usize,
pub not_ready: u64,
pub not_ready_duration: Duration,
pub restarts: u64,
pub io: Vec<IoConfigMetrics>,
pub io_other: IoMetricsSnapshot,
pub page_cache: PageCacheSnapshot,
pub runtime: RuntimeMetrics,
}Expand description
Metrics of a single worker.
A restarted worker keeps the metrics of the worker it replaces.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: WorkerIdWorker id.
items: u64Number of items, connections for network servers, the worker received.
active_connections: usizeNumber of open connections, network servers only.
not_ready: u64Number of times the worker service stopped being ready, e.g. it reached the maximum number of connections.
not_ready_duration: DurationTotal time the worker service was not ready, including the current period.
restarts: u64Number of times the worker was restarted after a failure.
io: Vec<IoConfigMetrics>I/O statistics of connections created on the worker, one entry per
listener configuration and per configuration with
IoConfig::set_metrics() enabled.
io_other: IoMetricsSnapshotI/O statistics of the worker’s other connections, e.g. client connections of configurations without their own metrics.
page_cache: PageCacheSnapshotStatistics of the worker thread’s buffer page cache.
The metrics are single-writer. While a failed worker’s thread is still releasing pages and its replacement already runs, updates can be lost, so after a worker restart the statistics may be slightly off.
runtime: RuntimeMetricsStatistics of the worker’s runtime.
Trait Implementations§
Source§impl Clone for WorkerMetrics
impl Clone for WorkerMetrics
Source§impl Debug for WorkerMetrics
impl Debug for WorkerMetrics
Source§impl Default for WorkerMetrics
impl Default for WorkerMetrics
impl Eq for WorkerMetrics
Source§impl PartialEq for WorkerMetrics
impl PartialEq for WorkerMetrics
impl StructuralPartialEq for WorkerMetrics
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.