2 runtime profiling tracy captures and budget gates
forgejo-actions edited this page 2026-07-14 17:23:30 +00:00

Runtime Profiling, Tracy Captures, And Budget Gates

Runtime profiling uses Tracy capture helpers, runtime profile environment knobs, CSV export, and budget gates to keep frame and scenario regressions visible.

How It Works

The perf helpers launch engine scenarios with profiling enabled, collect Tracy captures, export CSV data, and write markdown reports. xtask owns profile descriptors and budget gates so captures can be compared against expected scenario budgets.

AETHER_PROFILE settings and slow-frame reporting knobs decide what the runtime records while the scenario runs.

How To Use It

Choose the profile that matches the workflow: tracy-ai for runtime AI scenarios, tracy-editor-ui for editor UI profiling, or a budget gate profile for regression checks. Make sure Tracy capture and CSV export tools are available before running the helper.

Use cargo tracy-run for normal edit-profile iterations. It uses the release-optimized, incremental profiling Cargo profile and the bundled LLVM linker. Use cargo tracy-release-run, or pass --release-build to the xtask perf command, for the final production-fidelity capture. The xtask runner holds a cross-process session lock across its build, engine run, capture, and export so automated Tracy sessions cannot overlap.

Use the report to identify scenario boundaries, slow frames, and budget failures before changing runtime scheduling or rendering behavior.

Invariants

Capture profiles should describe the scenario being measured. Budget manifests should fail when performance meaningfully regresses, not because paths or tool versions drifted. Debug, profiling, and release captures should not be compared without noting the build mode. Final performance sign-off uses the release profile.

Debugging

Missing Tracy binaries, stale trace paths, wrong scene aliases, disabled profile env vars, and debug builds are common causes of misleading reports. If the budget table looks empty, confirm the capture exported CSV data for the expected scenario range.