pub struct CpuTimes {
pub cpu_id: Option<u32>,
pub user_ns: Option<u64>,
pub user_nice_ns: Option<u64>,
pub system_mode_ns: Option<u64>,
pub idle_ns: Option<u64>,
pub io_wait_ns: Option<u64>,
pub irq_ns: Option<u64>,
pub softirq_ns: Option<u64>,
}Expand description
Times in each mode, since boot. Unit: nanoseconds.
Fields§
§cpu_id: Option<u32>§user_ns: Option<u64>Time spent in user mode.
user_nice_ns: Option<u64>Time spent in user mode (low prio).
system_mode_ns: Option<u64>Time spent in system mode.
idle_ns: Option<u64>Time spent in the idle task.
io_wait_ns: Option<u64>Time spent waiting for I/O.
irq_ns: Option<u64>Time spent servicing interrupts.
softirq_ns: Option<u64>Time spent servicing softirqs.
Implementations§
Source§impl CpuTimes
impl CpuTimes
Sourcepub fn cpu_id(&self) -> u32
pub fn cpu_id(&self) -> u32
Returns the value of cpu_id, or the default value if cpu_id is unset.
Sourcepub fn user_ns(&self) -> u64
pub fn user_ns(&self) -> u64
Returns the value of user_ns, or the default value if user_ns is unset.
Sourcepub fn user_nice_ns(&self) -> u64
pub fn user_nice_ns(&self) -> u64
Returns the value of user_nice_ns, or the default value if user_nice_ns is unset.
Sourcepub fn system_mode_ns(&self) -> u64
pub fn system_mode_ns(&self) -> u64
Returns the value of system_mode_ns, or the default value if system_mode_ns is unset.
Sourcepub fn idle_ns(&self) -> u64
pub fn idle_ns(&self) -> u64
Returns the value of idle_ns, or the default value if idle_ns is unset.
Sourcepub fn io_wait_ns(&self) -> u64
pub fn io_wait_ns(&self) -> u64
Returns the value of io_wait_ns, or the default value if io_wait_ns is unset.
Sourcepub fn irq_ns(&self) -> u64
pub fn irq_ns(&self) -> u64
Returns the value of irq_ns, or the default value if irq_ns is unset.
Sourcepub fn softirq_ns(&self) -> u64
pub fn softirq_ns(&self) -> u64
Returns the value of softirq_ns, or the default value if softirq_ns is unset.
Trait Implementations§
Source§impl Message for CpuTimes
impl Message for CpuTimes
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.impl Copy for CpuTimes
impl StructuralPartialEq for CpuTimes
Auto Trait Implementations§
impl Freeze for CpuTimes
impl RefUnwindSafe for CpuTimes
impl Send for CpuTimes
impl Sync for CpuTimes
impl Unpin for CpuTimes
impl UnwindSafe for CpuTimes
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].