pub struct PoolingAllocatorMetrics { /* private fields */ }pooling-allocator only.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
Available on crate feature runtime only.
pub fn core_instances(&self) -> u64
runtime only.Returns the number of core (module) instances currently allocated.
Sourcepub fn component_instances(&self) -> u64
Available on crate feature runtime only.
pub fn component_instances(&self) -> u64
runtime only.Returns the number of component instances currently allocated.
Sourcepub fn memories(&self) -> usize
Available on crate feature runtime only.
pub fn memories(&self) -> usize
runtime only.Returns the number of WebAssembly memories currently allocated.
Sourcepub fn tables(&self) -> usize
Available on crate feature runtime only.
pub fn tables(&self) -> usize
runtime only.Returns the number of WebAssembly tables currently allocated.
Sourcepub fn stacks(&self) -> usize
Available on crate features runtime and async only.
pub fn stacks(&self) -> usize
runtime and async only.Returns the number of WebAssembly stacks currently allocated.
Sourcepub fn gc_heaps(&self) -> usize
Available on crate features runtime and gc only.
pub fn gc_heaps(&self) -> usize
runtime and gc only.Returns the number of WebAssembly GC heaps currently allocated.
Sourcepub fn unused_warm_memories(&self) -> u32
Available on crate feature runtime only.
pub fn unused_warm_memories(&self) -> u32
runtime only.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
Available on crate feature runtime only.
pub fn unused_memory_bytes_resident(&self) -> usize
runtime only.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
Available on crate feature runtime only.
pub fn unused_warm_tables(&self) -> u32
runtime only.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
Available on crate feature runtime only.
pub fn unused_table_bytes_resident(&self) -> usize
runtime only.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
Available on crate features runtime and async only.
pub fn unused_warm_stacks(&self) -> u32
runtime and async only.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>
Available on crate features runtime and async only.
pub fn unused_stack_bytes_resident(&self) -> Option<usize>
runtime and async only.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
Available on crate feature runtime only.
impl Clone for PoolingAllocatorMetrics
runtime only.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,
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