Perf Commands
A curated collection of 2 perf commands for building with AI coding agents.
Command
Profile Postgres Queries
Profile a Postgres workload to find the queries actually costing you — rank by total time with pg_stat_statements, EXPLAIN the worst offenders, and recommend the highest-leverage fix.
/profile-postgres-queries<database/connection details, a slow endpoint, or a description of the workload>
Command
Set Perf Budget
Define and enforce a cost and latency budget for an LLM feature or endpoint — set p95/p99 latency and cost-per-request ceilings, instrument to measure them against real traffic, and wire a check that fails when the budget is breached.
/set-perf-budget<the LLM endpoint/feature to budget, plus any target numbers (e.g. 'chat API, p95 < 2s, < $0.02/req')>