pub enum PerfMode {
Instructions,
Cycles,
Branches,
BranchMisses,
CacheRefs,
CacheMisses,
BusCycles,
RefCycles,
}
Expand description
The perf counter to measure when running a benchmark.
Variants§
Instructions
The number of instructions retired. These can be affected by various issues, most notably hardware interrupt counts.
Cycles
The total number of CPU cycles. This can be affected by CPU frequency scaling.
Branches
The number of branch instructions retired.
BranchMisses
The number of mispredicted branches.
CacheRefs
The number of cache accesses.
CacheMisses
The number of cache misses.
BusCycles
The number of bus cycles elapsed.
RefCycles
The total number of CPU cycles elapsed. This is not affected by CPU frequency scaling.
Trait Implementations§
impl Copy for PerfMode
impl Eq for PerfMode
impl StructuralPartialEq for PerfMode
Auto Trait Implementations§
impl Freeze for PerfMode
impl RefUnwindSafe for PerfMode
impl Send for PerfMode
impl Sync for PerfMode
impl Unpin for PerfMode
impl UnwindSafe for PerfMode
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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