pub struct TensorPoolStats {
pub total_acquired: AtomicU64,
pub total_released: AtomicU64,
pub total_allocs: AtomicU64,
pub total_reuses: AtomicU64,
pub total_bytes_pooled: AtomicU64,
}Expand description
Atomic counters tracking pool activity.
All fields use AtomicU64 and Relaxed ordering for maximum throughput.
Call TensorPoolStats::snapshot to obtain a consistent plain-struct view.
Fields§
§total_acquired: AtomicU64Total number of times acquire was called
total_released: AtomicU64Total number of times release was called
total_allocs: AtomicU64Fresh allocations that bypassed the pool (pool was empty for that bucket)
total_reuses: AtomicU64Pool-hit reuses (buffer served from the free list)
total_bytes_pooled: AtomicU64Running total of bytes currently held by all pooled buffers
Implementations§
Source§impl TensorPoolStats
impl TensorPoolStats
Sourcepub fn snapshot(&self) -> TensorPoolSnapshot
pub fn snapshot(&self) -> TensorPoolSnapshot
Capture a consistent snapshot of all counters.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for TensorPoolStats
impl RefUnwindSafe for TensorPoolStats
impl Send for TensorPoolStats
impl Sync for TensorPoolStats
impl Unpin for TensorPoolStats
impl UnsafeUnpin for TensorPoolStats
impl UnwindSafe for TensorPoolStats
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
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