pub struct PolylineFitLedger {
pub fits: u64,
pub unmet: u64,
pub station_ceiling: u64,
pub input_exhausted: u64,
pub stalled: u64,
pub unrefined: u64,
pub refined: u64,
pub met_at_pool: u64,
pub lane_switched: u64,
pub extra_rungs: u64,
pub worst_unmet_deviation: f64,
pub worst_dropped_band: f64,
}Expand description
Per-operation tally of polyline fits and how many missed their tolerance.
The same shape, and for the same reason, as crate::PcurveFitLedger:
fit_polyline is called from the imprint driver and from the offset
reintersection, neither of which has a diagnostics record to write into. An
operation that returns KernelDiagnostics opens a PolylineFitScope;
every fit made on that thread while the scope is open is tallied here, and
closing it hands the tally back for PolylineFitLedger::report_into.
Scopes nest — closing a child folds it into its parent — and a scope DROPPED
without being closed is discarded, so a refused boolean attempt does not
leave its fits on the caller’s tally. With no scope open, recording is a
no-op.
Fields§
§fits: u64Fits recorded, met ones included.
unmet: u64Fits whose returned curve did not reach its tolerance.
station_ceiling: u64Unmet fits that stopped at MAX_FIT_STATIONS.
input_exhausted: u64Unmet fits that had already used every station the input offers.
stalled: u64Unmet fits whose last doubling bought nothing.
unrefined: u64Unmet fits that never refined (a single-rung fit, or the escape hatch).
refined: u64Fits that spent more than one rung, met or not.
met_at_pool: u64Fits that met their tolerance only with every station the input offers —
a SATURATED reading (see PolylineFitReport::saturated).
lane_switched: u64Fits returned from the lane the caller did NOT ask for, because the caller’s own ladder ended unmet and the other lane measured better.
extra_rungs: u64Extra rungs spent over every fit — what the ladder cost.
worst_unmet_deviation: f64Largest deviation among the unmet fits; zero when there are none.
worst_dropped_band: f64Largest PolylineFitReport::dropped_band over every fit.
Implementations§
Source§impl PolylineFitLedger
impl PolylineFitLedger
Sourcepub fn report_into(&self, diagnostics: &mut KernelDiagnostics)
pub fn report_into(&self, diagnostics: &mut KernelDiagnostics)
Write the tally into an operation’s diagnostics: the fit.polyline.*
counters always, plus one fit.polyline.unmet_tolerance event at
DiagnosticSeverity::Degraded when any fit missed its tolerance.
Degraded, not Error: the curve is still the kernel’s best interpolant of
the points it was given and the solid stays shippable, but it no longer
claims the accuracy the caller asked for.