smelt.metrics.perf¶
Availability: Terminal UI only; raises in headless mode.
Advanced: Low-level building block for plugins that need full control. It may change more freely than the rest of the API.
Perf instrumentation toggle, clear, and snapshot. UiHost-only.
smelt.metrics.perf.clear¶
Clear all accumulated perf samples (durations and value gauges).
smelt.metrics.perf.enabled¶
Return whether perf instrumentation collection is enabled.
smelt.metrics.perf.set_enabled¶
Toggle perf instrumentation collection on/off. Disabled by default; enable to populate snapshot for the F12 debug panel.
smelt.metrics.perf.snapshot¶
Return the current perf snapshot as { durations, values, enabled } with per-label count, last, p50, p95, p99, max, total fields. Powers detailed diagnostics; prefer snapshot_top for live UI panels.
smelt.metrics.perf.snapshot_top¶
Return a cheap live perf snapshot with only the top limit duration rows and no value rows. Intended for panels that refresh frequently.