pub struct Diagnostics {Show 35 fields
pub dependence_length: usize,
pub effective_sample_size: usize,
pub stationarity_ratio: f64,
pub stationarity_ok: bool,
pub outlier_rate_baseline: f64,
pub outlier_rate_sample: f64,
pub outlier_asymmetry_ok: bool,
pub discrete_mode: bool,
pub timer_resolution_ns: f64,
pub duplicate_fraction: f64,
pub preflight_ok: bool,
pub calibration_samples: usize,
pub total_time_secs: f64,
pub warnings: Vec<String>,
pub quality_issues: Vec<QualityIssue>,
pub preflight_warnings: Vec<PreflightWarningInfo>,
pub seed: Option<u64>,
pub attacker_model: Option<String>,
pub threshold_ns: f64,
pub timer_name: String,
pub platform: String,
pub timer_fallback_reason: Option<String>,
pub gibbs_iters_total: usize,
pub gibbs_burnin: usize,
pub gibbs_retained: usize,
pub lambda_mean: f64,
pub lambda_sd: f64,
pub lambda_cv: f64,
pub lambda_ess: f64,
pub lambda_mixing_ok: bool,
pub kappa_mean: f64,
pub kappa_sd: f64,
pub kappa_cv: f64,
pub kappa_ess: f64,
pub kappa_mixing_ok: bool,
}Expand description
Diagnostic information for debugging and analysis.
See spec Section 6 (Quality Metrics).
Fields§
§dependence_length: usizeBlock size used for bootstrap (Politis-White automatic selection).
effective_sample_size: usizeEffective sample size accounting for autocorrelation (ESS approx n / dependence_length).
stationarity_ratio: f64Non-stationarity: ratio of inference to calibration variance. Values 0.5-2.0 are normal; >5.0 indicates non-stationarity.
stationarity_ok: boolTrue if stationarity ratio is within acceptable bounds (0.5-2.0).
outlier_rate_baseline: f64Outlier rate for baseline class (fraction trimmed).
outlier_rate_sample: f64Outlier rate for sample class (fraction trimmed).
outlier_asymmetry_ok: boolTrue if outlier rates are symmetric (both <1%, ratio <3x, diff <2%).
discrete_mode: boolWhether discrete timer mode was used (low timer resolution).
timer_resolution_ns: f64Timer resolution in nanoseconds.
duplicate_fraction: f64Fraction of samples with duplicate timing values (0.0-1.0).
preflight_ok: boolTrue if preflight checks passed (sanity, generator, system).
calibration_samples: usizeNumber of samples used for calibration (covariance estimation).
total_time_secs: f64Total time spent on the analysis in seconds.
warnings: Vec<String>Human-readable warnings (empty if all checks pass).
quality_issues: Vec<QualityIssue>Quality issues detected during measurement.
preflight_warnings: Vec<PreflightWarningInfo>Preflight warnings from calibration phase.
These warnings are categorized by severity:
Informational: Sampling efficiency issues (results still valid)ResultUndermining: Statistical assumption violations (results may be unreliable)
seed: Option<u64>Measurement seed used for reproducibility.
attacker_model: Option<String>Attacker model name (e.g., “AdjacentNetwork”, “SharedHardware”).
threshold_ns: f64Effect threshold (theta) in nanoseconds.
timer_name: StringTimer implementation name (e.g., “rdtsc”, “cntvct_el0”, “kperf”).
platform: StringPlatform description (e.g., “macos-aarch64”).
timer_fallback_reason: Option<String>Reason the timer fell back from high-precision PMU (if applicable).
Used to generate context-aware recommendations in output.
- “concurrent access”: kperf locked by another process
- “no sudo”: not running with elevated privileges
- “unavailable”: PMU init failed despite privileges
- None: using high-precision timer or x86_64 (rdtsc is already ~0.3ns)
gibbs_iters_total: usizev5.4: Total number of Gibbs iterations.
gibbs_burnin: usizev5.4: Number of burn-in iterations.
gibbs_retained: usizev5.4: Number of retained samples.
lambda_mean: f64v5.4: Posterior mean of latent scale λ.
lambda_sd: f64v5.4: Posterior standard deviation of λ.
lambda_cv: f64v5.4: Coefficient of variation of λ (λ_sd / λ_mean).
lambda_ess: f64v5.4: Effective sample size of λ chain.
lambda_mixing_ok: boolv5.4: Whether λ chain mixed well (CV ≥ 0.1 AND ESS ≥ 20).
kappa_mean: f64v5.6: Posterior mean of likelihood precision κ.
kappa_sd: f64v5.6: Posterior standard deviation of κ.
kappa_cv: f64v5.6: Coefficient of variation of κ (kappa_sd / kappa_mean).
kappa_ess: f64v5.6: Effective sample size of κ chain.
kappa_mixing_ok: boolv5.6: Whether κ chain mixed well (CV ≥ 0.1 AND ESS ≥ 20).
Implementations§
Source§impl Diagnostics
impl Diagnostics
Sourcepub fn all_ok() -> Diagnostics
pub fn all_ok() -> Diagnostics
Create diagnostics indicating all checks passed.
Uses placeholder values for numeric fields; prefer constructing explicitly with actual measured values.
Sourcepub fn all_checks_passed(&self) -> bool
pub fn all_checks_passed(&self) -> bool
Check if all diagnostics are OK.
Trait Implementations§
Source§impl Clone for Diagnostics
impl Clone for Diagnostics
Source§fn clone(&self) -> Diagnostics
fn clone(&self) -> Diagnostics
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Diagnostics
impl Debug for Diagnostics
Source§impl Default for Diagnostics
impl Default for Diagnostics
Source§fn default() -> Diagnostics
fn default() -> Diagnostics
Source§impl<'de> Deserialize<'de> for Diagnostics
impl<'de> Deserialize<'de> for Diagnostics
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Diagnostics, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Diagnostics, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for Diagnostics
impl Serialize for Diagnostics
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for Diagnostics
impl RefUnwindSafe for Diagnostics
impl Send for Diagnostics
impl Sync for Diagnostics
impl Unpin for Diagnostics
impl UnsafeUnpin for Diagnostics
impl UnwindSafe for Diagnostics
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> 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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.