# beginFrame
function beginFrame()Initialize state for begin frame.
src/miniquake/optimization_baseline.mlminiquake/native.ml as native → src/miniquake/native.mlstd/fs.ml as fs → ../MiniLangCompilerOptimization/MiniLangCompilerPy/std/fs.ml external dependencyfunction beginFrame()Initialize state for begin frame.
function boolText(value)Implements the `boolText` operation for `miniquake.optimization_baseline` (bool text).
| Parameter | Type | Default | Description |
|---|---|---|---|
value | dynamic | — | Value consumed by `boolText`. |
function checkpoint(stage)Checks point for `miniquake.optimization_baseline`.
| Parameter | Type | Default | Description |
|---|---|---|---|
stage | dynamic | — | The stage input consumed by `checkpoint`. |
function classifyHandles(handles, nonHandleStable)Implements the `classifyHandles` operation for `miniquake.optimization_baseline` (classify handles).
| Parameter | Type | Default | Description |
|---|---|---|---|
handles | dynamic | — | The handles input consumed by `classifyHandles`. |
nonHandleStable | dynamic | — | The non handle stable input consumed by `classifyHandles`. |
function completeFrame()Handle frame and update the associated state.
function configure(frameCapacity)Implements the `configure` operation for `miniquake.optimization_baseline` (configure).
| Parameter | Type | Default | Description |
|---|---|---|---|
frameCapacity | dynamic | — | The frame capacity input consumed by `configure`. |
function disable()Implements the `disable` operation for `miniquake.optimization_baseline` (disable).
function enabled()Report whether enabled holds for the active state.
function filteredFrame()Implements the `filteredFrame` operation for `miniquake.optimization_baseline` (filtered frame).
function handleSequenceText(values)Handle sequence text and update the associated state.
| Parameter | Type | Default | Description |
|---|---|---|---|
values | dynamic | — | The values input consumed by `handleSequenceText`. |
function normalizeStage(stage)Convert stage into its canonical representation.
| Parameter | Type | Default | Description |
|---|---|---|---|
stage | dynamic | — | The stage input consumed by `normalizeStage`. |
const OTHER_STAGE_INDEX = 19Defines the other stage index value used by `miniquake.optimization_baseline`.
function percentileFromSorted(values, numerator, denominator)Implements the `percentileFromSorted` operation for `miniquake.optimization_baseline` (percentile from sorted).
| Parameter | Type | Default | Description |
|---|---|---|---|
values | dynamic | — | The values input consumed by `percentileFromSorted`. |
numerator | dynamic | — | The numerator input consumed by `percentileFromSorted`. |
denominator | dynamic | — | The denominator input consumed by `percentileFromSorted`. |
function printSlowFrames(minimumMilliseconds)Print the stage breakdown for frames at or above the requested duration.
| Parameter | Type | Default | Description |
|---|---|---|---|
minimumMilliseconds | dynamic | — | The minimum milliseconds input consumed by `printSlowFrames`. |
function printSummary(mode, mapName)Format and emit summary.
| Parameter | Type | Default | Description |
|---|---|---|---|
mode | dynamic | — | The mode input consumed by `printSummary`. |
mapName | dynamic | — | Name of the map to load or inspect. |
profileCapacityTracks the module-level profile capacity state owned by `miniquake.optimization_baseline`.
profileDurationsTracks the module-level profile durations state owned by `miniquake.optimization_baseline`.
profileEnabledTracks the module-level profile enabled state owned by `miniquake.optimization_baseline`.
profileFrameActiveTracks the module-level profile frame active state owned by `miniquake.optimization_baseline`.
profileFrameCountTracks the module-level profile frame count state owned by `miniquake.optimization_baseline`.
profileFrameStartTracks the module-level profile frame start state owned by `miniquake.optimization_baseline`.
profileLastTickTracks the module-level profile last tick state owned by `miniquake.optimization_baseline`.
profileStageFramesTracks the module-level profile stage frames state owned by `miniquake.optimization_baseline`.
profileStageHitsTracks the module-level profile stage hits state owned by `miniquake.optimization_baseline`.
profileStageTotalsTracks the module-level profile stage totals state owned by `miniquake.optimization_baseline`.
function recordedFrames()Implements the `recordedFrames` operation for `miniquake.optimization_baseline` (recorded frames).
function resourceJson(values)Implements the `resourceJson` operation for `miniquake.optimization_baseline` (resource json).
| Parameter | Type | Default | Description |
|---|---|---|---|
values | dynamic | — | The values input consumed by `resourceJson`. |
function sortedDurations()Implements the `sortedDurations` operation for `miniquake.optimization_baseline` (sorted durations).
const STAGE_COUNT = 46Defines the stage count value used by `miniquake.optimization_baseline`.
function stageIndex(stage)Return stage index derived from the active module state.
| Parameter | Type | Default | Description |
|---|---|---|---|
stage | dynamic | — | The stage input consumed by `stageIndex`. |
stageLookupKeysTracks the module-level stage lookup keys state owned by `miniquake.optimization_baseline`.
stageLookupValuesTracks the module-level stage lookup values state owned by `miniquake.optimization_baseline`.
stageNamesTracks the module-level stage names state owned by `miniquake.optimization_baseline`.
function stageTotalsJson()Implements the `stageTotalsJson` operation for `miniquake.optimization_baseline` (stage totals json).
function summary()Return summary derived from the active module state.
function writeReports(prefix, mode, mapName, beforeResources, afterResources)Encode and write reports.
| Parameter | Type | Default | Description |
|---|---|---|---|
prefix | dynamic | — | The prefix input consumed by `writeReports`. |
mode | dynamic | — | The mode input consumed by `writeReports`. |
mapName | dynamic | — | Name of the map to load or inspect. |
beforeResources | dynamic | — | The before resources input consumed by `writeReports`. |
afterResources | dynamic | — | The after resources input consumed by `writeReports`. |