1.4 KiB
1.4 KiB
Performance Workflow
This repository includes a lightweight performance workflow built around the existing startup and query profilers.
Build Once
bun run build
Baseline Scenarios
- Cold start and command latency
bun run perf:startup -- --help
- Interactive startup in a real session
bun run perf:startup --
Use your OS task manager while the app is idle to inspect CPU, RSS, and handle count after first render.
- Headless query / TTFT
bun run perf:query -- --print "Summarize the current directory."
This requires whatever auth/config is normally needed for the chosen provider.
Artifacts
Each run writes an isolated artifact bundle under .perf-artifacts/:
summary.json: wall-clock timing and parsed profiler highlightsconfig/startup-perf/*: startup profiler outputconfig/query-perf/*: query profiler outputdebug/*: debug logs for runs that need them
Regression Checks
Run the focused regression checks for the new performance helpers with:
bun run perf:regression
Suggested Before/After Loop
- Run the startup baseline.
- Run the headless query baseline.
- If you are changing long-running behavior, also launch an interactive session and watch idle CPU and memory for a few minutes.
- Compare the new
.perf-artifactssummary against the previous run before and after each optimization pass.