#[non_exhaustive]pub struct RuntimeMetrics {
pub busy_duration: Option<Duration>,
pub polls: Option<u64>,
pub polls_again: Option<u64>,
pub self_wakes: Option<u64>,
pub poll_histogram: Option<Histogram>,
pub current_turn: Option<Duration>,
pub current_task: Option<&'static Location<'static>>,
pub latency: Option<LatencyMetrics>,
}Expand description
Runtime statistics of a worker.
Counters, durations and histograms are totals over all runtimes the
worker slot ran on, a restarted worker continues the totals of the worker
it replaces. Values a runtime backend does not provide are None.
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.busy_duration: Option<Duration>Total time the runtime was busy running tasks.
The busy_duration delta divided by the elapsed time is the worker’s
utilization. On tokio it is available only for current-thread
runtimes.
polls: Option<u64>Number of runtime turns that ran scheduled tasks. Not available on tokio.
polls_again: Option<u64>Number of runtime turns that left scheduled tasks for the next turn. Not available on tokio.
self_wakes: Option<u64>Number of times a task woke itself while it was polled. Neon only.
poll_histogram: Option<Histogram>Durations of runtime turns. Not available on tokio.
current_turn: Option<Duration>How long the current runtime turn has been running, None while the
runtime is idle or the backend does not track turns.
current_task: Option<&'static Location<'static>>Spawn location of the task the runtime is polling now. Neon only.
latency: Option<LatencyMetrics>Scheduling latency and stalls, None if latency sampling is disabled,
see ntex_rt::Builder::latency_interval().
histogram, stalls and stall_duration are totals over all
runtimes of the worker slot, the other fields describe the current
runtime.
Trait Implementations§
Source§impl Clone for RuntimeMetrics
impl Clone for RuntimeMetrics
Source§impl Debug for RuntimeMetrics
impl Debug for RuntimeMetrics
Source§impl Default for RuntimeMetrics
impl Default for RuntimeMetrics
impl Eq for RuntimeMetrics
Source§impl PartialEq for RuntimeMetrics
impl PartialEq for RuntimeMetrics
impl StructuralPartialEq for RuntimeMetrics
Auto Trait Implementations§
impl Freeze for RuntimeMetrics
impl RefUnwindSafe for RuntimeMetrics
impl Send for RuntimeMetrics
impl Sync for RuntimeMetrics
impl Unpin for RuntimeMetrics
impl UnsafeUnpin for RuntimeMetrics
impl UnwindSafe for RuntimeMetrics
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.