pub struct PerPhaseSchedstat {
pub phases: [HostVcpuSchedstat; 5],
}Expand description
Per-lifecycle-phase host-dilation witness: normally one
HostVcpuSchedstat DELTA per stage, covering the schedstat accrued
between lifecycle-event boundary snapshots. If the guest-reported
scenario duration proves queued lifecycle frames did not bracket Body,
Body instead carries the complete enclosing vCPU-thread lifetime. That
conservative fallback can overstate Body contention but cannot hide it.
Indexed by LifecycleStage as usize.
Distinct from the whole-run VmResult::host_vcpu_schedstat (which is
the verdict-line D over the entire run): normally each phase gets its OWN
D over its OWN span, so the Body phase’s dilation — the only phase whose
contention actually contaminates the workload measurement — is isolated
from the Boot / Attach / Teardown INFRA phases. The batched-delivery
fallback deliberately gives up that localization. Boot/Attach D is
diagnostic; Body is the one the latency verdict consumes.
The dispatch path takes each boundary snapshot immediately after accepting the CRC-valid lifecycle frame. ScenarioEnd’s guest duration detects start/end frames accepted together after a starved dispatch loop. A wide-VM snapshot is a sequential sweep of the vCPU TIDs rather than an atomic kernel operation, so its uncertainty is the duration of that rare sweep, not the monitor’s sampling period.
Fields§
§phases: [HostVcpuSchedstat; 5]Per-stage schedstat delta, indexed by LifecycleStage as usize
(Boot=0 .. Teardown=4). A stage never entered stays at the
Default all-zero value (dilation() == None).
Implementations§
Source§impl PerPhaseSchedstat
impl PerPhaseSchedstat
Sourcepub fn body(&self) -> &HostVcpuSchedstat
pub fn body(&self) -> &HostVcpuSchedstat
The Body (measurement) phase’s schedstat delta — the phase whose dilation the latency verdict consumes.
Sourcepub fn body_dilation(&self) -> Option<f64>
pub fn body_dilation(&self) -> Option<f64>
The Body phase’s host dilation D, or None when no on-CPU time was
sampled in the Body span (schedstats off, or the phase never ran).
Trait Implementations§
Source§impl Clone for PerPhaseSchedstat
impl Clone for PerPhaseSchedstat
Source§fn clone(&self) -> PerPhaseSchedstat
fn clone(&self) -> PerPhaseSchedstat
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PerPhaseSchedstat
impl Debug for PerPhaseSchedstat
Source§impl Default for PerPhaseSchedstat
impl Default for PerPhaseSchedstat
Source§fn default() -> PerPhaseSchedstat
fn default() -> PerPhaseSchedstat
Source§impl<'de> Deserialize<'de> for PerPhaseSchedstat
impl<'de> Deserialize<'de> for PerPhaseSchedstat
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for PerPhaseSchedstat
impl PartialEq for PerPhaseSchedstat
Source§impl Serialize for PerPhaseSchedstat
impl Serialize for PerPhaseSchedstat
impl Copy for PerPhaseSchedstat
impl Eq for PerPhaseSchedstat
impl StructuralPartialEq for PerPhaseSchedstat
Auto Trait Implementations§
impl Freeze for PerPhaseSchedstat
impl RefUnwindSafe for PerPhaseSchedstat
impl Send for PerPhaseSchedstat
impl Sync for PerPhaseSchedstat
impl Unpin for PerPhaseSchedstat
impl UnwindSafe for PerPhaseSchedstat
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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