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 charged per pass and per poll (dominated by the O(N ≤ 256) id scan
in the hooks), so it scales with both rates. Measured on the demo firmware
(RP2350, 8 nodes, trace-hooks + trace-nested, HTTP load): 0.7–1.0% of
wall time run-to-run at ~1.9k polls/s and ~3.5k passes/s, so under ~5 µs per
poll, and that bound also absorbs the inter-poll ISR time folded into this
term. Scale it by your own node count and rates rather than reusing the number.
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