Skip to main content

PcurveFitLedger

Struct PcurveFitLedger 

Source
pub struct PcurveFitLedger {
Show 13 fields pub fits: u64, pub unmet: u64, pub sample_ceiling: u64, pub round_budget: u64, pub stalled: u64, pub span_floor: u64, pub worst_unmet_residual: f64, pub raised: u64, pub raise_declined: u64, pub worst_off_surface: f64, pub clamped: u64, pub worst_clamped_excursion: f64, pub worst_clamped_distance: f64,
}
Expand description

Per-operation tally of pcurve fits and how many missed their floor.

build_pcurve_on_surface and its marched twin are called from some forty sites, most of which have no diagnostics record to write into. Rather than thread one through every layer, an operation that returns KernelDiagnostics opens a PcurveFitScope; every fit made on that thread while the scope is open is tallied here, and closing the scope hands the tally back for PcurveFitLedger::report_into. This is the shape the boolean’s CONFORMANCE_REPAIRS counter already uses. With no scope open, recording is a no-op.

Scopes nest: CLOSING a child folds it into its parent, so an offset shell sees the fits of the booleans it ran. A scope that is DROPPED without being closed is discarded, not folded — a boolean attempt that refused (and may be retried under perturbation) must not leave its fits on the caller’s tally.

Thread-local by construction: a fit made on a rayon worker (the parallel feature’s STEP body import) is not seen by a scope on the calling thread. No diagnostics-returning operation builds pcurves off-thread today.

Fields§

§fits: u64

Fits recorded, exact affine ones included.

§unmet: u64

Fits whose returned curve did not reach its floor.

§sample_ceiling: u64

Unmet fits that stopped at a sample ceiling.

§round_budget: u64

Unmet fits that spent every refinement round.

§stalled: u64

Unmet fits that could insert nothing.

§span_floor: u64

Unmet fits whose remaining over-floor spans were all below the loop’s 1e-3 span floor.

§worst_unmet_residual: f64

Largest residual among the unmet fits; zero when there are none.

§raised: u64

Fits that re-entered refinement with PCURVE_RAISED_SAMPLES, met or not.

§raise_declined: u64

Unmet ceiling exits that were NOT raised because the residual is already within the floor of the edge curve’s own gap from the surface.

§worst_off_surface: f64

Largest PcurveFitReport::off_surface over every fit.

§clamped: u64

Fits whose interpolant was clamped into an open direction’s domain (PcurveFitReport::clamped_excursion above zero), met or not.

§worst_clamped_excursion: f64

Largest PcurveFitReport::clamped_excursion over every fit.

§worst_clamped_distance: f64

Largest PcurveFitReport::clamped_distance over every fit.

Implementations§

Source§

impl PcurveFitLedger

Source

pub fn report_into(&self, diagnostics: &mut KernelDiagnostics)

Write the tally into an operation’s diagnostics: the pcurve.* counters and measurements always, plus one pcurve.unmet_floor event at DiagnosticSeverity::Degraded when any fit missed its floor. Degraded, not Error: the result is still the kernel’s best construction and stays shippable, but it no longer claims the accuracy its floor states.

Trait Implementations§

Source§

impl Clone for PcurveFitLedger

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for PcurveFitLedger

Source§

impl Debug for PcurveFitLedger

Source§

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

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

impl Default for PcurveFitLedger

Source§

fn default() -> Self

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

impl PartialEq for PcurveFitLedger

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for PcurveFitLedger

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, 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> 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 = !

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

fn try_from(value: U) -> Result<T, !>

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<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more