Issie logo Issie

SimLog Module

Every simulation invocation, logged the same way in both runtimes. The hooks live inside the shared simulator code - one record per startCircuitSimulation (kind "build") and one per runFastSimulation invocation that advances the clock (kind "run") - so Electron and the dotnet sidecar cannot instrument differently. Because the renderer's progress bar works by calling runFastSimulation repeatedly with a timeout, each progress-bar update is exactly one record here, and the sidecar's chunked runs produce the same shape: any user-driven session yields directly comparable per-chunk numbers from both runtimes, pulled as JSON by the DevHarness `simLog` command on the Electron side and the SimLog protocol command on the sidecar side. A bounded ring of records rather than prints: process state, not model state (docs/mutableState.md) - written from inside the simulator, which has no dispatch, at the write frequency of a progress tick. A live line per record goes to Log.dbg Log.Sim, so the usual category switches make it visible without a rebuild.

Types and nested modules

Type/Module Description

Constants

SimLogKind

SimLogRecord

Functions and values

Function or value Description

beginInvocation ()

Full Usage: beginInvocation ()

Parameters:
    () : unit

Bracket an invocation: called where its timing starts, so that GC and core samples cover the same span as its Ms.

() : unit

clear ()

Full Usage: clear ()

Parameters:
    () : unit

() : unit

recent ()

Full Usage: recent ()

Parameters:
    () : unit

Returns: SimLogRecord list

The recorded invocations, oldest first.

() : unit
Returns: SimLogRecord list

recentJson ()

Full Usage: recentJson ()

Parameters:
    () : unit

Returns: string

The recorded invocations as a JSON array, hand-built so both runtimes emit byte-identical shapes with no serializer in the way.

() : unit
Returns: string

record kind sheet components fromCycle toCycle ms

Full Usage: record kind sheet components fromCycle toCycle ms

Parameters:
    kind : SimLogKind
    sheet : string
    components : int
    fromCycle : int
    toCycle : int
    ms : float

Record one invocation. Called from inside the simulator; everything else reads.

kind : SimLogKind
sheet : string
components : int
fromCycle : int
toCycle : int
ms : float

sampleCore ()

Full Usage: sampleCore ()

Parameters:
    () : unit

Note which core this is running on. Called from the simulator's run loop at its existing time-check point - every hundred clock steps, so a million cycles costs ten thousand of these - and does nothing at all where the CPU is not hybrid.

() : unit

Type something to start searching.