pub struct InstanceMetricsSnapshot {
pub kernels_launched: u64,
pub bytes_pinned: u64,
pub back_pressure_rejections: u64,
pub yield_count: u32,
pub device_bytes_allocated: u64,
}Expand description
Aggregated, read-only view of a single instance’s wasi-cuda activity.
Produced by WasiCudaContext::metrics_snapshot /
WasiCudaContext::metrics_snapshot_with_scheduler. Every field is a
pure read of an existing atomic / counter, so collecting a snapshot is
cheap and never mutates host state — it is safe to call from an
operator-facing metrics endpoint on the hot path.
Counter semantics:
kernels_launchedandback_pressure_rejectionsare monotonically-increasing lifetime counters for the instance.bytes_pinnedanddevice_bytes_allocatedare current gauges (sum over live registry entries), so they fall when kernels / buffers are released.yield_countcomes from the matchingSchedulerContext; it is0when a snapshot is taken without one (the wasi-cuda context does not own the scheduler — they are sibling fields on the executor’s per-instance state).
Fields§
§kernels_launched: u64Lifetime count of kernel launches that reached the dispatch path.
bytes_pinned: u64Current aggregate retained PTX bytes across live kernels (the host-memory the registry has “pinned” for this instance).
back_pressure_rejections: u64Lifetime count of launches refused by the back-pressure path (semaphore saturated or per-invocation deadline tripped).
yield_count: u32Cumulative cooperative-yield() calls observed by the matching
SchedulerContext, or 0 when the snapshot was taken without one.
device_bytes_allocated: u64Current aggregate live device-buffer bytes allocated via the
explicit alloc surface.
Trait Implementations§
Source§impl Clone for InstanceMetricsSnapshot
impl Clone for InstanceMetricsSnapshot
Source§fn clone(&self) -> InstanceMetricsSnapshot
fn clone(&self) -> InstanceMetricsSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for InstanceMetricsSnapshot
Source§impl Debug for InstanceMetricsSnapshot
impl Debug for InstanceMetricsSnapshot
Source§impl Default for InstanceMetricsSnapshot
impl Default for InstanceMetricsSnapshot
Source§fn default() -> InstanceMetricsSnapshot
fn default() -> InstanceMetricsSnapshot
impl Eq for InstanceMetricsSnapshot
Source§impl PartialEq for InstanceMetricsSnapshot
impl PartialEq for InstanceMetricsSnapshot
Source§fn eq(&self, other: &InstanceMetricsSnapshot) -> bool
fn eq(&self, other: &InstanceMetricsSnapshot) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for InstanceMetricsSnapshot
Auto Trait Implementations§
impl Freeze for InstanceMetricsSnapshot
impl RefUnwindSafe for InstanceMetricsSnapshot
impl Send for InstanceMetricsSnapshot
impl Sync for InstanceMetricsSnapshot
impl Unpin for InstanceMetricsSnapshot
impl UnsafeUnpin for InstanceMetricsSnapshot
impl UnwindSafe for InstanceMetricsSnapshot
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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