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§
Source§impl PoolingAllocatorMetrics
impl PoolingAllocatorMetrics
Sourcepub fn core_instances(&self) -> u64
pub fn core_instances(&self) -> u64
Returns the number of core (module) instances currently allocated.
Sourcepub fn component_instances(&self) -> u64
pub fn component_instances(&self) -> u64
Returns the number of component instances currently allocated.
Sourcepub fn memories(&self) -> usize
pub fn memories(&self) -> usize
Returns the number of WebAssembly memories currently allocated.
Sourcepub fn gc_heaps(&self) -> usize
pub fn gc_heaps(&self) -> usize
Returns the number of WebAssembly GC heaps currently allocated.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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§
Source§impl Clone for PoolingAllocatorMetrics
impl Clone for PoolingAllocatorMetrics
Source§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 !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