pub struct ExecutorStats {
pub idle_ticks: u32,
pub exec_ticks: u32,
pub polls: u32,
pub passes: u32,
}Expand description
A snapshot of one executor’s accounting. All fields are wrapping u32 tick /
event counters — sample twice and wrapping_sub for rates. The decomposition
over a sampling window of dt ticks:
busy = dt - Δidle_ticks (executor not sleeping)
in-poll = Δexec_ticks (inside task polls, supervised or not)
overhead = busy - Δexec_ticks (executor bookkeeping + trace-hook cost
+ ISR time landing between polls)
unsupervised = Δexec_ticks - Σ Δnode.exec_ticks() (task polls that resolve
to no supervised node)Overhead is per-poll (~15–20 µs, dominated by the O(N ≤ 256) id scan in the hooks), so it scales with poll rate — measured ~13% of a 150 MHz core at ~8k polls/s under HTTP load.
Empty scheduler passes count as idle, not overhead: the idle window stays
open across a pass that polls nothing (see on_poll_start), because such a
wakeup is ~100 ns uninstrumented and timestamping it would make the trace
hooks themselves the dominant “overhead”. Δpasses vs Δpolls still shows
the empty-wakeup rate explicitly.
Fields§
§idle_ticks: u32Accumulated idle ticks (includes a currently-open idle window, so a sleeping executor doesn’t read as busy between samples).
exec_ticks: u32Accumulated in-poll ticks across ALL task polls on this executor.
polls: u32Task polls (supervised or not).
passes: u32Scheduler passes (poll_start events); polls / passes = polls per pass.
Trait Implementations§
Source§impl Clone for ExecutorStats
impl Clone for ExecutorStats
Source§fn clone(&self) -> ExecutorStats
fn clone(&self) -> ExecutorStats
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more