Expand description
Structured per-load pipeline diagnostics — the cross-target contract.
Lives in ifc-lite-processing (not the geometry crate) because this is
where the per-phase numbers are actually collected: the phase timers
(ProcessingStats.{parse,entity_scan,lookup,preprocess,geometry}_time_ms)
are measured by processor::process_geometry_*, and the per-element
production counters (degenerate-backstop drops, CSG failure drains) are
owned by element::produce_element_meshes. The geometry crate only knows
router-level CSG/opening data, which it already publishes as
ifc_lite_geometry::GeometryDiagnostics; this struct composes those
aggregates with the pipeline-level timings and counts.
Serde contract: camelCase renames plus an explicit schema_version, the
same pattern as GeometryDiagnostics (see its
serializes_camelcase_keys_matching_the_ts_contract guard, mirrored
below). The wasm getter (IfcAPI::getPipelineDiagnostics) crosses it to
JS via serde_wasm_bindgen::to_value, exactly like diagnoseGeometry.
Population:
- wasm: the LIVE channel. Accumulated on the NORMAL load path — every
processGeometryBatch*call folds one [Self::record_batch] in (cheap counters plus twojs_sys::Date::now()reads per batch, so it is always on).std::time::Instanttraps on wasm32, so onlyphase_ms.geometry_ms/total_msare filled; the scan/prepass phases run in JS workers outside the wasm module and stay 0. - native: [
Self::from_processing_stats] maps a finishedProcessingStats(all phase timers available) into this shape. It is provided for a native consumer that wants the unified vocabulary, but is NOT wired into a live server/CLI pipeline today — those surface the same numbers directly viaProcessingStats+GeometryDiagnostics. So the wasm getter is the only shipping producer; the native constructor is available API, not a second projection kept in lockstep.
Structs§
- Pipeline
Diagnostics - Aggregate structured diagnostics for one model load. Counter names are
aligned with the existing
GeometryDiagnosticscontract (total_csg_failures,hosts_with_openings,rect_fast, …) so a consumer reading both sees one vocabulary. - Pipeline
Phase Timings - Pipeline phase wall-times in milliseconds. Field names mirror the
ProcessingStatstimers they are sourced from. On wasm32 onlygeometry_msis populated (see the module docs).
Constants§
- PIPELINE_
DIAGNOSTICS_ SCHEMA_ VERSION - Version of the
PipelineDiagnosticswire shape. Bump on any breaking key change so JS consumers can gate on it.