[][src]Struct perf_event::CountAndTime

#[repr(C)]pub struct CountAndTime {
    pub count: u64,
    pub time_enabled: u64,
    pub time_running: u64,
}

The value of a counter, along with timesharing data.

Some counters are implemented in hardware, and the processor can run only a fixed number of them at a time. If more counters are requested than the hardware can support, the kernel timeshares them on the hardware.

This struct holds the value of a counter, together with the time it was enabled, and the proportion of that for which it was actually running.

Fields

count: u64

The counter value.

The meaning of this field depends on how the counter was configured when it was built; see ['Builder'].

time_enabled: u64

How long this counter was enabled by the program, in nanoseconds.

time_running: u64

How long the kernel actually ran this counter, in nanoseconds.

If time_enabled == time_running, then the counter ran for the entire period it was enabled, without interruption. Otherwise, the counter shared the underlying hardware with others, and you should prorate its value accordingly.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.