pub struct ValidatorStats {
pub id: usize,
pub name: String,
pub alpha: f64,
pub beta: f64,
pub cost_ema: Duration,
pub observations: u64,
pub failures: u64,
}Expand description
Per-validator statistics tracked by the pipeline.
Fields§
§id: usizeUnique identifier for this validator.
name: StringHuman-readable name (for logging/ledger).
alpha: f64Beta posterior α (pseudo-count of failures + prior).
beta: f64Beta posterior β (pseudo-count of successes + prior).
cost_ema: DurationEMA of observed cost.
observations: u64Total number of observations.
failures: u64Total failures observed.
Implementations§
Source§impl ValidatorStats
impl ValidatorStats
Sourcepub fn failure_prob(&self) -> f64
pub fn failure_prob(&self) -> f64
Posterior mean failure probability: α / (α + β).
Sourcepub fn score(&self, c_min: Duration) -> f64
pub fn score(&self, c_min: Duration) -> f64
Score used for ordering: p / c (higher = should run earlier).
Sourcepub fn confidence_width(&self) -> f64
pub fn confidence_width(&self) -> f64
95% credible interval width (normal approximation for large α+β).
Trait Implementations§
Source§impl Clone for ValidatorStats
impl Clone for ValidatorStats
Source§fn clone(&self) -> ValidatorStats
fn clone(&self) -> ValidatorStats
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 moreAuto Trait Implementations§
impl Freeze for ValidatorStats
impl RefUnwindSafe for ValidatorStats
impl Send for ValidatorStats
impl Sync for ValidatorStats
impl Unpin for ValidatorStats
impl UnsafeUnpin for ValidatorStats
impl UnwindSafe for ValidatorStats
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