Skip to content

smelt.metrics.perf

Tier: UiHost — Requires a terminal UI; calling these from headless mode raises.

Perf instrumentation toggle, clear, and snapshot. UiHost-only.

smelt.metrics.perf.clear

fun(): nil

Clear all accumulated perf samples (durations and value gauges).

smelt.metrics.perf.set_enabled

fun(on: boolean): nil

Toggle perf instrumentation collection on/off. Disabled by default; enable to populate snapshot for the F12 debug panel.

smelt.metrics.perf.snapshot

fun(): table

Return the current perf snapshot as { durations, values, enabled } with per-label count, last, p50, p95, p99, max, total fields. Powers the F12 debug panel.