[−][src]Struct perf_event::CountAndTime
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
impl RefUnwindSafe for CountAndTime
impl Send for CountAndTime
impl Sync for CountAndTime
impl Unpin for CountAndTime
impl UnwindSafe for CountAndTime
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,