pub trait Analyzer: Send + Sync {
// Required methods
fn evaluate(&self, data: &ProbeSet) -> SampleDecision;
fn oracle_class(&self) -> OracleClass;
// Provided method
fn analyze(&self, data: &ProbeSet) -> OracleResult { ... }
}Expand description
Analyzes a set of baseline and probe response surfaces and produces an oracle verdict.
Implementors must be Send + Sync so they can be held in shared state across async tasks.
All methods take &self — analyzers are stateless with respect to individual probe runs.
Required Methods§
Sourcefn evaluate(&self, data: &ProbeSet) -> SampleDecision
fn evaluate(&self, data: &ProbeSet) -> SampleDecision
Incrementally evaluate a growing ProbeSet.
Called after each new pair is added. Returns NeedMore until enough samples are
collected to determine stability, then Complete with the final result.
Sourcefn oracle_class(&self) -> OracleClass
fn oracle_class(&self) -> OracleClass
The oracle class this analyzer handles.
Provided Methods§
Sourcefn analyze(&self, data: &ProbeSet) -> OracleResult
fn analyze(&self, data: &ProbeSet) -> OracleResult
Analyze a fully-collected ProbeSet and return a verdict with evidence and severity.
This is a provided method that delegates to evaluate. It exists for
callers that supply a complete ProbeSet in one shot rather than driving the incremental
sampling loop. Panics if evaluate returns NeedMore, which indicates the ProbeSet
does not yet contain enough samples.
§Panics
Panics when evaluate returns NeedMore, meaning the supplied ProbeSet has fewer
samples than this analyzer requires.