PerfCounters

Struct PerfCounters 

Source
#[repr(align(64))]
pub struct PerfCounters { pub fast_path_hits: AtomicU64, pub slow_path_hits: AtomicU64, pub cache_bounces: AtomicU64, pub numa_local_allocations: AtomicU64, pub numa_remote_allocations: AtomicU64, pub optimized_context_switches: AtomicU64, pub simd_operations: AtomicU64, pub lockfree_operations: AtomicU64, }
Expand description

Performance counters for monitoring optimization effectiveness.

Fields§

§fast_path_hits: AtomicU64

Number of fast path hits

§slow_path_hits: AtomicU64

Number of slow path hits

§cache_bounces: AtomicU64

Number of cache line bounces detected

§numa_local_allocations: AtomicU64

Number of NUMA-optimized allocations

§numa_remote_allocations: AtomicU64

Number of NUMA remote allocations

§optimized_context_switches: AtomicU64

Total context switches optimized

§simd_operations: AtomicU64

SIMD operations executed

§lockfree_operations: AtomicU64

Lock-free operations completed

Implementations§

Source§

impl PerfCounters

Source

pub fn record_fast_path(&self)

Record a fast path hit.

Source

pub fn record_slow_path(&self)

Record a slow path hit.

Source

pub fn record_cache_bounce(&self)

Record a cache bounce.

Source

pub fn record_numa_local(&self)

Record a NUMA-local allocation.

Source

pub fn record_numa_remote(&self)

Record a NUMA-remote allocation.

Source

pub fn record_context_switch(&self)

Record an optimized context switch.

Source

pub fn record_simd_operation(&self)

Record a SIMD operation.

Source

pub fn record_lockfree_operation(&self)

Record a lock-free operation.

Source

pub fn fast_path_ratio(&self) -> f64

Get fast path hit ratio.

Source

pub fn numa_locality_ratio(&self) -> f64

Get NUMA locality ratio.

Source

pub fn reset(&self)

Reset all counters.

Trait Implementations§

Source§

impl Default for PerfCounters

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.