@sheetwrite/corefunction
Reject overlap, negative values, and attempts to fold runtime observations into owner totals.
- Package
@sheetwrite/core- Source
packages/core/src/resource-accounting.ts#L353
Declaration
function assertRuntimeResourceSnapshot( snapshot: RuntimeResourceSnapshotinterface RuntimeResourceSnapshot {
readonly schemaVersion: typeof RUNTIME_RESOURCE_SCHEMA_VERSION;
readonly operation: RuntimeResourceOperation;
readonly phase: RuntimeResourcePhase;
readonly wasm: StoreMemoryBreakdown;
readonly jsOwners: readonly ResourceOwnerBytes[];
readonly boundary: readonly BoundaryOperationStats[];
readonly runtime: RuntimeMemoryObservation;
readonly totals: {
readonly logicalLiveBytes: number;
readonly allocatedCapacityBytes: number;
};
}interface RuntimeResourceSnapshot {
readonly schemaVersion: typeof RUNTIME_RESOURCE_SCHEMA_VERSION;
readonly operation: RuntimeResourceOperation;
readonly phase: RuntimeResourcePhase;
readonly wasm: StoreMemoryBreakdown;
readonly jsOwners: readonly ResourceOwnerBytes[];
readonly boundary: readonly BoundaryOperationStats[];
readonly runtime: RuntimeMemoryObservation;
readonly totals: {
readonly logicalLiveBytes: number;
readonly allocatedCapacityBytes: number;
};
}interface RuntimeResourceSnapshot {
readonly schemaVersion: typeof RUNTIME_RESOURCE_SCHEMA_VERSION;
readonly operation: RuntimeResourceOperation;
readonly phase: RuntimeResourcePhase;
readonly wasm: StoreMemoryBreakdown;
readonly jsOwners: readonly ResourceOwnerBytes[];
readonly boundary: readonly BoundaryOperationStats[];
readonly runtime: RuntimeMemoryObservation;
readonly totals: {
readonly logicalLiveBytes: number;
readonly allocatedCapacityBytes: number;
};
}Complete retained-resource and boundary snapshot for one operation phase.API reference →,): void