Skip to main content

Diagnostics

Struct Diagnostics 

Source
pub struct Diagnostics {
Show 39 fields pub dependence_length: usize, pub effective_sample_size: usize, pub stationarity_ratio: f64, pub stationarity_ok: bool, pub projection_mismatch_q: f64, pub projection_mismatch_threshold: f64, pub projection_mismatch_ok: bool, pub top_quantiles: Option<Vec<TopQuantile>>, 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 4.1 (Result Types).

Fields§

§dependence_length: usize

Block size used for bootstrap (Politis-White automatic selection).

§effective_sample_size: usize

Effective sample size accounting for autocorrelation (ESS approx n / dependence_length).

§stationarity_ratio: f64

Non-stationarity: ratio of inference to calibration variance. Values 0.5-2.0 are normal; >5.0 indicates non-stationarity.

§stationarity_ok: bool

True if stationarity ratio is within acceptable bounds (0.5-2.0).

§projection_mismatch_q: f64

Projection mismatch Q statistic.

Measures how well the 2D (shift, tail) model fits the 9D quantile differences. A high value indicates the effect is concentrated at specific quantiles rather than following the shift+tail pattern.

§projection_mismatch_threshold: f64

Bootstrap-calibrated threshold for projection mismatch Q statistic. Q > threshold indicates the 2D projection may be unreliable.

§projection_mismatch_ok: bool

True if projection fits well (Q <= threshold).

When false, the shift_ns and tail_ns estimates should be interpreted with caution; use top_quantiles for more detailed information.

§top_quantiles: Option<Vec<TopQuantile>>

Top quantiles by exceedance probability (when projection mismatch detected).

When projection_mismatch_ok is false, this field contains detailed information about which quantiles drive the leak detection. This helps diagnose effects that don’t fit the shift+tail model (e.g., effects concentrated at a single quantile).

§outlier_rate_baseline: f64

Outlier rate for baseline class (fraction trimmed).

§outlier_rate_sample: f64

Outlier rate for sample class (fraction trimmed).

§outlier_asymmetry_ok: bool

True if outlier rates are symmetric (both <1%, ratio <3x, diff <2%).

§discrete_mode: bool

Whether discrete timer mode was used (low timer resolution).

§timer_resolution_ns: f64

Timer resolution in nanoseconds.

§duplicate_fraction: f64

Fraction of samples with duplicate timing values (0.0-1.0).

§preflight_ok: bool

True if preflight checks passed (sanity, generator, system).

§calibration_samples: usize

Number of samples used for calibration (covariance estimation).

§total_time_secs: f64

Total 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: f64

Effect threshold (theta) in nanoseconds.

§timer_name: String

Timer implementation name (e.g., “rdtsc”, “cntvct_el0”, “kperf”).

§platform: String

Platform 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: usize

v5.4: Total number of Gibbs iterations.

§gibbs_burnin: usize

v5.4: Number of burn-in iterations.

§gibbs_retained: usize

v5.4: Number of retained samples.

§lambda_mean: f64

v5.4: Posterior mean of latent scale λ.

§lambda_sd: f64

v5.4: Posterior standard deviation of λ.

§lambda_cv: f64

v5.4: Coefficient of variation of λ (λ_sd / λ_mean).

§lambda_ess: f64

v5.4: Effective sample size of λ chain.

§lambda_mixing_ok: bool

v5.4: Whether λ chain mixed well (CV ≥ 0.1 AND ESS ≥ 20).

§kappa_mean: f64

v5.6: Posterior mean of likelihood precision κ.

§kappa_sd: f64

v5.6: Posterior standard deviation of κ.

§kappa_cv: f64

v5.6: Coefficient of variation of κ (kappa_sd / kappa_mean).

§kappa_ess: f64

v5.6: Effective sample size of κ chain.

§kappa_mixing_ok: bool

v5.6: Whether κ chain mixed well (CV ≥ 0.1 AND ESS ≥ 20).

Implementations§

Source§

impl Diagnostics

Source

pub fn all_ok() -> Diagnostics

Create diagnostics indicating all checks passed.

Uses placeholder values for numeric fields; prefer constructing explicitly with actual measured values.

Source

pub fn all_checks_passed(&self) -> bool

Check if all diagnostics are OK.

Trait Implementations§

Source§

impl Clone for Diagnostics

Source§

fn clone(&self) -> Diagnostics

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Diagnostics

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for Diagnostics

Source§

fn default() -> Diagnostics

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Diagnostics

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<Diagnostics, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Diagnostics

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> EventData for T
where T: Send + Sync,