Struct PoolingAllocatorMetrics
pub struct PoolingAllocatorMetrics { /* private fields */ }Expand description
PoolingAllocatorMetrics provides access to runtime metrics of a pooling
allocator configured with crate::InstanceAllocationStrategy::Pooling.
This is a cheap cloneable handle which can be obtained with
Engine::pooling_allocator_metrics.
Implementations§
§impl PoolingAllocatorMetrics
impl PoolingAllocatorMetrics
pub fn core_instances(&self) -> u64
pub fn core_instances(&self) -> u64
Returns the number of core (module) instances currently allocated.
pub fn component_instances(&self) -> u64
pub fn component_instances(&self) -> u64
Returns the number of component instances currently allocated.
pub fn unused_warm_memories(&self) -> u32
pub fn unused_warm_memories(&self) -> u32
Returns the number of slots for linear memories in this allocator which are not currently in use but were previously used.
A “warm” slot means that there was a previous instantiation of a memory in that slot. Warm slots are favored in general for allocating new memories over using a slot that has never been used before.
pub fn unused_memory_bytes_resident(&self) -> usize
pub fn unused_memory_bytes_resident(&self) -> usize
Returns the number of bytes in this pooling allocator which are not part
of any in-used linear memory slot but were previously used and are kept
resident via the *_keep_resident configuration options.
pub fn unused_warm_tables(&self) -> u32
pub fn unused_warm_tables(&self) -> u32
Returns the number of slots for tables in this allocator which are not currently in use but were previously used.
A “warm” slot means that there was a previous instantiation of a table in that slot. Warm slots are favored in general for allocating new tables over using a slot that has never been used before.
pub fn unused_table_bytes_resident(&self) -> usize
pub fn unused_table_bytes_resident(&self) -> usize
Returns the number of bytes in this pooling allocator which are not part
of any in-used linear table slot but were previously used and are kept
resident via the *_keep_resident configuration options.
pub fn unused_warm_stacks(&self) -> u32
pub fn unused_warm_stacks(&self) -> u32
Returns the number of slots for stacks in this allocator which are not currently in use but were previously used.
A “warm” slot means that there was a previous use of a stack in that slot. Warm slots are favored in general for allocating new stacks over using a slot that has never been used before.
pub fn unused_stack_bytes_resident(&self) -> Option<usize>
pub fn unused_stack_bytes_resident(&self) -> Option<usize>
Returns the number of bytes in this pooling allocator which are not part
of any in-used linear stack slot but were previously used and are kept
resident via the *_keep_resident configuration options.
This returns None if the async_stack_zeroing option is disabled or
if the platform doesn’t manage stacks (e.g. Windows returns None).
Trait Implementations§
§impl Clone for PoolingAllocatorMetrics
impl Clone for PoolingAllocatorMetrics
§fn clone(&self) -> PoolingAllocatorMetrics
fn clone(&self) -> PoolingAllocatorMetrics
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for PoolingAllocatorMetrics
impl !RefUnwindSafe for PoolingAllocatorMetrics
impl Send for PoolingAllocatorMetrics
impl Sync for PoolingAllocatorMetrics
impl Unpin for PoolingAllocatorMetrics
impl UnsafeUnpin for PoolingAllocatorMetrics
impl !UnwindSafe for PoolingAllocatorMetrics
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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> ⓘ
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