pub struct InvariantTestReport {
pub name: String,
pub category: InvariantCategory,
pub samples: usize,
pub failures: usize,
pub failure_rate: f64,
pub probability_bound: Option<f64>,
pub verified: bool,
pub sample_errors: Vec<GeometricError>,
pub confidence_interval: Option<(f64, f64)>,
pub confidence_level: Option<f64>,
}Expand description
Result of running an invariant test suite
Fields§
§name: StringName of the invariant
category: InvariantCategoryCategory (impossible, rare, emergent)
samples: usizeNumber of samples tested
failures: usizeNumber of failures
failure_rate: f64Observed failure rate (failures / samples)
probability_bound: Option<f64>Probability bound (for rare invariants)
verified: boolWhether the invariant was verified
sample_errors: Vec<GeometricError>Sample of failure errors (if any)
confidence_interval: Option<(f64, f64)>Confidence interval for the failure rate estimate (lower, upper)
Computed using Hoeffding-based bounds from amari-flynn. Only populated for Rare invariants verified with Monte Carlo.
confidence_level: Option<f64>Confidence level of the statistical verification (0.0 to 1.0)
Computed from the Hoeffding bound given sample count and epsilon.
Implementations§
Source§impl InvariantTestReport
impl InvariantTestReport
Sourcepub fn is_violated(&self) -> bool
pub fn is_violated(&self) -> bool
Check if the invariant was violated
Trait Implementations§
Source§impl Clone for InvariantTestReport
impl Clone for InvariantTestReport
Source§fn clone(&self) -> InvariantTestReport
fn clone(&self) -> InvariantTestReport
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InvariantTestReport
impl Debug for InvariantTestReport
Source§impl<'de> Deserialize<'de> for InvariantTestReport
impl<'de> Deserialize<'de> for InvariantTestReport
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for InvariantTestReport
impl RefUnwindSafe for InvariantTestReport
impl Send for InvariantTestReport
impl Sync for InvariantTestReport
impl Unpin for InvariantTestReport
impl UnsafeUnpin for InvariantTestReport
impl UnwindSafe for InvariantTestReport
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
Mutably borrows from an owned value. Read more
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>
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 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>
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