pub struct ResourceMonitor { /* private fields */ }Expand description
リソース使用量監視
Implementations§
Source§impl ResourceMonitor
impl ResourceMonitor
pub fn new() -> Self
Sourcepub fn record_allocation(&mut self, size_bytes: usize)
pub fn record_allocation(&mut self, size_bytes: usize)
メモリ使用量を記録
Sourcepub fn record_deallocation(&mut self, size_bytes: usize)
pub fn record_deallocation(&mut self, size_bytes: usize)
メモリ解放を記録
Sourcepub fn peak_memory_mb(&self) -> f64
pub fn peak_memory_mb(&self) -> f64
ピークメモリ使用量を取得
Sourcepub fn current_memory_mb(&self) -> f64
pub fn current_memory_mb(&self) -> f64
現在のメモリ使用量を取得
Sourcepub fn allocation_count(&self) -> usize
pub fn allocation_count(&self) -> usize
割り当て回数を取得
Trait Implementations§
Source§impl Clone for ResourceMonitor
impl Clone for ResourceMonitor
Source§fn clone(&self) -> ResourceMonitor
fn clone(&self) -> ResourceMonitor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResourceMonitor
impl Debug for ResourceMonitor
Auto Trait Implementations§
impl Freeze for ResourceMonitor
impl RefUnwindSafe for ResourceMonitor
impl Send for ResourceMonitor
impl Sync for ResourceMonitor
impl Unpin for ResourceMonitor
impl UnsafeUnpin for ResourceMonitor
impl UnwindSafe for ResourceMonitor
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
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