pub struct FtraceCpuStats {
pub cpu: Option<u64>,
pub entries: Option<u64>,
pub overrun: Option<u64>,
pub commit_overrun: Option<u64>,
pub bytes_read: Option<u64>,
pub oldest_event_ts: Option<f64>,
pub now_ts: Option<f64>,
pub dropped_events: Option<u64>,
pub read_events: Option<u64>,
}Expand description
Per-CPU kernel buffer stats for the ftrace data source gathered from /sys/kernel/tracing/per_cpu/cpuX/stats.
Fields§
§cpu: Option<u64>CPU index.
entries: Option<u64>Number of entries currently in the kernel buffer.
overrun: Option<u64>Number of events lost in kernel buffers due to overwriting of old events before userspace had a chance to drain them. Valid if the buffer is in “overwrite” mode, otherwise see |dropped_events|.
commit_overrun: Option<u64>This should always be zero. If not the buffer size is way too small or something went wrong with the tracer. Quoting the kernel: “number of commits failing due to the buffer wrapping around while there are uncommitted events, such as during an interrupt storm”.
bytes_read: Option<u64>Size of entries currently in the kernel buffer (see |entries|) in bytes. The field should be named “bytes”, but is misnamed for historical reasons. This value has known inaccuracies before Linux v6.6: https://github.com/torvalds/linux/commit/45d99ea
oldest_event_ts: Option<f64>The timestamp for the oldest event still in the ring buffer. Unit: seconds for typical trace clocks (i.e. not tsc/counter).
now_ts: Option<f64>The current timestamp. Unit: seconds for typical trace clocks (i.e. not tsc/counter).
dropped_events: Option<u64>If the kernel buffer has overwrite mode disabled, this will show the number of new events that were lost because the buffer was full. This is similar to |overrun| but only for the overwrite=false case.
read_events: Option<u64>The number of events read (consumed) from the buffer by userspace.
Implementations§
Source§impl FtraceCpuStats
impl FtraceCpuStats
Sourcepub fn entries(&self) -> u64
pub fn entries(&self) -> u64
Returns the value of entries, or the default value if entries is unset.
Sourcepub fn overrun(&self) -> u64
pub fn overrun(&self) -> u64
Returns the value of overrun, or the default value if overrun is unset.
Sourcepub fn commit_overrun(&self) -> u64
pub fn commit_overrun(&self) -> u64
Returns the value of commit_overrun, or the default value if commit_overrun is unset.
Sourcepub fn bytes_read(&self) -> u64
pub fn bytes_read(&self) -> u64
Returns the value of bytes_read, or the default value if bytes_read is unset.
Sourcepub fn oldest_event_ts(&self) -> f64
pub fn oldest_event_ts(&self) -> f64
Returns the value of oldest_event_ts, or the default value if oldest_event_ts is unset.
Sourcepub fn now_ts(&self) -> f64
pub fn now_ts(&self) -> f64
Returns the value of now_ts, or the default value if now_ts is unset.
Sourcepub fn dropped_events(&self) -> u64
pub fn dropped_events(&self) -> u64
Returns the value of dropped_events, or the default value if dropped_events is unset.
Sourcepub fn read_events(&self) -> u64
pub fn read_events(&self) -> u64
Returns the value of read_events, or the default value if read_events is unset.
Trait Implementations§
Source§impl Clone for FtraceCpuStats
impl Clone for FtraceCpuStats
Source§fn clone(&self) -> FtraceCpuStats
fn clone(&self) -> FtraceCpuStats
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FtraceCpuStats
impl Debug for FtraceCpuStats
Source§impl Default for FtraceCpuStats
impl Default for FtraceCpuStats
Source§fn default() -> FtraceCpuStats
fn default() -> FtraceCpuStats
Source§impl Message for FtraceCpuStats
impl Message for FtraceCpuStats
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.Source§impl PartialEq for FtraceCpuStats
impl PartialEq for FtraceCpuStats
impl Copy for FtraceCpuStats
impl StructuralPartialEq for FtraceCpuStats
Auto Trait Implementations§
impl Freeze for FtraceCpuStats
impl RefUnwindSafe for FtraceCpuStats
impl Send for FtraceCpuStats
impl Sync for FtraceCpuStats
impl Unpin for FtraceCpuStats
impl UnwindSafe for FtraceCpuStats
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].