#[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
impl PerfCounters
Sourcepub fn record_fast_path(&self)
pub fn record_fast_path(&self)
Record a fast path hit.
Sourcepub fn record_slow_path(&self)
pub fn record_slow_path(&self)
Record a slow path hit.
Sourcepub fn record_cache_bounce(&self)
pub fn record_cache_bounce(&self)
Record a cache bounce.
Sourcepub fn record_numa_local(&self)
pub fn record_numa_local(&self)
Record a NUMA-local allocation.
Sourcepub fn record_numa_remote(&self)
pub fn record_numa_remote(&self)
Record a NUMA-remote allocation.
Sourcepub fn record_context_switch(&self)
pub fn record_context_switch(&self)
Record an optimized context switch.
Sourcepub fn record_simd_operation(&self)
pub fn record_simd_operation(&self)
Record a SIMD operation.
Sourcepub fn record_lockfree_operation(&self)
pub fn record_lockfree_operation(&self)
Record a lock-free operation.
Sourcepub fn fast_path_ratio(&self) -> f64
pub fn fast_path_ratio(&self) -> f64
Get fast path hit ratio.
Sourcepub fn numa_locality_ratio(&self) -> f64
pub fn numa_locality_ratio(&self) -> f64
Get NUMA locality ratio.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for PerfCounters
impl RefUnwindSafe for PerfCounters
impl Send for PerfCounters
impl Sync for PerfCounters
impl Unpin for PerfCounters
impl UnwindSafe for PerfCounters
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