#[non_exhaustive]pub struct ShardStats {Show 23 fields
pub worker: Option<usize>,
pub runtime: Option<RuntimeId>,
pub backend: IoBackend,
pub tasks: usize,
pub polls: u64,
pub parks: u64,
pub parked: Duration,
pub busy: Duration,
pub queue_depth: usize,
pub remote_wakes: u64,
pub ops_in_flight: usize,
pub cq_overflows: u64,
pub buffer_bytes: usize,
pub buffer_cap: usize,
pub buffer_exhausted: u64,
pub timers: usize,
pub handoffs: u64,
pub longest_poll: Duration,
pub budget_yields: u64,
pub poll_times: Option<Histogram>,
pub io_latencies: Option<IoLatencies>,
pub io: Option<IoCounts>,
pub errors: ErrorCounts,
}Expand description
One shard’s counters. Those marked “published” are as the shard last published them (see the module).
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.worker: Option<usize>The shard’s place among its runtime’s workers; None for the shard
of a thread that runs block_on.
runtime: Option<RuntimeId>The runtime the shard is a worker of; None for the shard of a
thread that runs block_on, which serves every runtime the thread
enters.
backend: IoBackendThe kernel interface the shard’s IO runs on.
tasks: usizeTasks placed on the shard and not done yet.
polls: u64Task polls the shard has run (published).
parks: u64Times the shard slept with nothing to run (published).
parked: DurationTime the shard spent asleep, in all (published).
busy: DurationTime since the shard was made that it did not spend asleep: running tasks, driving its IO and timers, spinning before a park (from the published time asleep).
queue_depth: usizeRunnables waiting in the shard’s own queue, its LIFO slot included (published).
remote_wakes: u64Runnables of the shard’s tasks it took from other threads: a task woken there, or spawned onto it from there (published).
ops_in_flight: usizeIO operations the shard handed to the kernel that have not ended: on io_uring the operations submitted, on IOCP the ones issued. A readiness poller (epoll, kqueue) hands the kernel none, as its driver makes each call once the descriptor is ready: 0 there (published).
cq_overflows: u64Times the shard found completions the kernel was holding for want of room in the ring’s completion queue (none is lost: the kernel keeps them until there is room); 0 on other backends (published).
buffer_bytes: usizeBytes the shard’s IO buffers hold: its pool’s, in use and free, and on io_uring its receive buffers’ (published).
buffer_cap: usizeThe most bytes the shard’s IO buffers may hold, its receive buffers
included (Builder::io_buffer_cap).
buffer_exhausted: u64Times a buffer was wanted while every byte under the pool’s cap was in use; the IO waits for one to come back (published).
timers: usizeTimers armed on the shard (published).
handoffs: u64Times the shard went to another thread because the thread running it
stayed in one poll past Builder::handoff_after.
longest_poll: DurationThe longest poll the runtime saw on the shard, at the resolution of its watch (a quarter of the handoff threshold); zero when no poll lasted that long, or with the handoff off.
budget_yields: u64Times a task’s poll on the shard spent its budget of operations and
yielded to the shard’s other tasks (see
task::coop).
poll_times: Option<Histogram>How long each task poll on the shard ran, while its runtime records
it (Builder::record_latencies);
None when it does not, which is not a shard with no polls.
io_latencies: Option<IoLatencies>How long the shard’s IO operations took from their submission to the
kernel to their completion, by kind, while its runtime records
latencies (Builder::record_latencies);
None when it does not, and None on a readiness backend (epoll,
kqueue), whose calls are made once the kernel reports the descriptor
ready, so there is no wait in the kernel per operation to time. With
the io-stats feature only.
io: Option<IoCounts>The IO operations the shard’s thread completed, while its runtime
counts them (Builder::count_io);
None when it does not, which is not a shard that did no IO
(published). With the io-stats feature only.
errors: ErrorCountsErrors of IO run on the shard.
Trait Implementations§
Source§impl Clone for ShardStats
impl Clone for ShardStats
Source§fn clone(&self) -> ShardStats
fn clone(&self) -> ShardStats
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more