pub struct PoolStats {
pub alloc_count: u64,
pub reuse_count: u64,
pub cached_bytes: u64,
pub pending_return_bytes: u64,
pub capacity_waste_bytes: u64,
pub released_bytes: u64,
}Expand description
[SizeClassPool] の統計スナップショット(POD。ハンドル・ポインタ・
trait object を一切含まない。設計文書 §3.1「フィールド更新契約」表が
各フィールドの増減規則の正)。
stats() 単発の呼び出し内で全フィールドが厳密に同一時刻の値である
ことは要求しない(Mutex 保護フィールドと AtomicU64
(pending_return_bytes)を別々に読むため。診断用スナップショットと
しての利用に留める。§3.1)。
Fields§
§alloc_count: u64新規物理確保([SizeClassPool::record_allocation])の累積回数。
reuse_count: u64フリーリストからの再利用ヒット([SizeClassPool::take] が
Some を返した回数)の累積。
cached_bytes: u64フリーリストが現在保持する総バイト数
(Σ(フリーリスト中の各エントリの class_bytes))。
pending_return_bytes: u64Metal 専用: GPU 完了待ちでフリーリストへ未合流の返却待ちバイト数
(CUDA・CPU では常に 0)。
capacity_waste_bytes: u64現在貸出中の全ハンドルについての内部断片化ストック量
(Σ(class_bytes − logical_bytes)。累積ではなくリアルタイム値)。
released_bytes: u64release_cached() が個別解放に成功した累積バイト数(診断用)。
Trait Implementations§
impl Copy for PoolStats
impl Eq for PoolStats
impl StructuralPartialEq for PoolStats
Auto Trait Implementations§
impl Freeze for PoolStats
impl RefUnwindSafe for PoolStats
impl Send for PoolStats
impl Sync for PoolStats
impl Unpin for PoolStats
impl UnsafeUnpin for PoolStats
impl UnwindSafe for PoolStats
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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