/** * `SolverDiagnostics` for the core (W2 design 2.5, D17 as Dev ruled): the * stat counters (`bo_engine_stat`, core/README.md "Stat indices") mapped onto * classic's diagnostics fields where, and only where, the meaning matches. * Everything else classic reports (the adaptive step, the step cap, matrix * health, error control) has no core counterpart and is left out of the * record rather than filled with a plausible number. * * A host reads the counters before and after one batch and passes both here; * the counters are cumulative since load, so the batch is the difference. * Every counter is published under `core` with its own name: none of them * means what a similarly named classic field means (events processed is not * `steps`, solution-cache hits are not LU reuse, IC evaluations are not * truth-table cache misses, the largest partition is not the MNA size, a * failed advance is not a rejected step). The record outside `core` carries * only `engine` and the host's batch timing. * * Pure data shaping, like readout.ts: no ABI calls except `readCoreStats`. */ import type { CoreSolverDiagnostics } from "../sim/messages.js"; import type { CoreEngine } from "./engine.js"; /** Counters this module reads: indices 0-26, the table as of F5 (stats 25 and 26 are F5's). */ export declare const CORE_STAT_COUNT = 27; /** A read of the first {@link CORE_STAT_COUNT} counters. */ export type CoreStatSnapshot = readonly number[]; export declare function readCoreStats(engine: CoreEngine): CoreStatSnapshot; /** What the host knows about the batch that the counters cannot say. */ export interface CoreBatchInfo { /** False when the batch's advance failed (`CoreEngine.lastConverged`). */ readonly converged: boolean; readonly batchWallUs?: number; readonly batchCompletion?: number; readonly realtimeRatio?: number; } export declare function coreSolverDiagnostics(before: CoreStatSnapshot, after: CoreStatSnapshot, info: CoreBatchInfo): CoreSolverDiagnostics;