Skip to main content

DriverStats

Struct DriverStats 

Source
pub struct DriverStats {
    pub waits: u64,
    pub recv_calls: u64,
    pub send_calls: u64,
    pub accept_calls: u64,
    pub other_calls: u64,
    pub sqes: u64,
    pub os_events: u64,
    pub sleeps: u64,
    pub spin_polls: u64,
}
Expand description

System calls and events counted by a driver (plain counters; read them on the loop thread).

Fields§

§waits: u64

Waits: epoll_wait, kevent, io_uring_enter, GetQueuedCompletionStatusEx.

§recv_calls: u64

Receive calls: recv, recvmmsg, WSARecv/WSARecvMsg (io_uring: none, completions only).

§send_calls: u64

Send calls: sendmsg/send, WSASend (io_uring: none, submissions only).

§accept_calls: u64

Accept calls: accept4, AcceptEx.

§other_calls: u64

Other system calls: registration, epoll_ctl, eventfd reads, io_uring_register, …

§sqes: u64

io_uring submission queue entries pushed (buffer hand-overs with PROVIDE_BUFFERS not counted).

§os_events: u64

Completions or readiness events taken from the OS.

§sleeps: u64

Waits that blocked (put the thread to sleep, or could have: a non-zero timeout).

§spin_polls: u64

Non-blocking polls made while busy polling (also counted in waits when they were system calls; io_uring polls its rings in user space and enters only when work is flagged).

Implementations§

Source§

impl DriverStats

Source

pub fn syscalls(&self) -> u64

All counted system calls.

Trait Implementations§

Source§

impl Clone for DriverStats

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for DriverStats

Source§

impl Debug for DriverStats

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for DriverStats

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for DriverStats

Source§

impl PartialEq for DriverStats

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for DriverStats

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.