#[repr(i32)]pub enum Counter {
Show 21 variants
UnknownCounter = 0,
SwCpuClock = 1,
SwPageFaults = 2,
SwTaskClock = 3,
SwContextSwitches = 4,
SwCpuMigrations = 5,
SwPageFaultsMin = 6,
SwPageFaultsMaj = 7,
SwAlignmentFaults = 8,
SwEmulationFaults = 9,
SwDummy = 20,
HwCpuCycles = 10,
HwInstructions = 11,
HwCacheReferences = 12,
HwCacheMisses = 13,
HwBranchInstructions = 14,
HwBranchMisses = 15,
HwBusCycles = 16,
HwStalledCyclesFrontend = 17,
HwStalledCyclesBackend = 18,
HwRefCpuCycles = 19,
}Expand description
Builtin counter names from the uapi header. Commented with their perf tool aliases. TODO(rsavitski): consider generating enums for cache events (should be finite), and generally make this list as extensive as possible. Excluding things like dynamic PMUs since those don’t fit into a static enum. Next id: 21
Variants§
UnknownCounter = 0
SwCpuClock = 1
cpu-clock
SwPageFaults = 2
page-faults, faults
SwTaskClock = 3
task-clock
SwContextSwitches = 4
context-switches, cs
SwCpuMigrations = 5
cpu-migrations, migrations
SwPageFaultsMin = 6
minor-faults
SwPageFaultsMaj = 7
major-faults
SwAlignmentFaults = 8
alignment-faults
SwEmulationFaults = 9
emulation-faults
SwDummy = 20
dummy
HwCpuCycles = 10
cpu-cycles, cycles
HwInstructions = 11
instructions
HwCacheReferences = 12
cache-references
HwCacheMisses = 13
cache-misses
HwBranchInstructions = 14
branch-instructions, branches
HwBranchMisses = 15
branch-misses
HwBusCycles = 16
bus-cycles
HwStalledCyclesFrontend = 17
stalled-cycles-frontend, idle-cycles-frontend
HwStalledCyclesBackend = 18
stalled-cycles-backend, idle-cycles-backend
HwRefCpuCycles = 19
ref-cycles
Implementations§
Source§impl Counter
impl Counter
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Counter>
pub fn from_str_name(value: &str) -> Option<Counter>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Ord for Counter
impl Ord for Counter
Source§impl PartialOrd for Counter
impl PartialOrd for Counter
impl Copy for Counter
impl Eq for Counter
impl StructuralPartialEq for Counter
Auto Trait Implementations§
impl Freeze for Counter
impl RefUnwindSafe for Counter
impl Send for Counter
impl Sync for Counter
impl Unpin for Counter
impl UnwindSafe for Counter
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§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].