"The orders page feels slow lately." No error, no stack trace, no alert. Just a vague complaint and an endpoint that used to be fast.
Pasting "make this faster" into an AI coding agent is tempting, but without numbers it will guess, and it will often guess wrong. Here's the staged workflow I'd run on a Mac instead, with one tool per stage, so the agent gets evidence instead of vibes.
Stage 1: Measure it
1. oha
oha is a small HTTP load generator written in Rust that shows a live terminal UI while it runs. Point it at the endpoint for a fixed duration (oha -z 10s <url>) and you get a latency histogram and percentiles, so "feels slow" becomes a number you can compare later. Free, MIT licensed, and on Homebrew (brew install oha).
Stage 2: Find the slow span
2. Jaeger
If your app already emits OpenTelemetry traces, Jaeger shows where a request spends its time: handler, database, cache or a third-party call. The getting started guide runs the all-in-one version in a single container with in-memory storage, which is plenty for a local debugging session. Free and open source.
Stage 3: Find the hot function
3. speedscope
When the trace says "it's our code," you need a profile. For Node, node --cpu-prof writes a .cpuprofile file on exit (Node docs), and speedscope turns it into an interactive flame graph in the browser. It also imports py-spy, rbspy, pprof and Instruments.app profiles. Free and MIT licensed.
Stage 4: Check the query
4. explain.dalibo.com
Slow endpoints are often one slow Postgres query. Run EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS, FORMAT JSON) and paste the output here to see the plan as a tree, with the expensive nodes easy to spot. If you don't want to send a plan over the internet, there's a standalone HTML version you can open locally.
Stage 5: Hand the evidence to the agent
5. Claude Code
Now the prompt has substance: the oha numbers, the slow span from Jaeger, the hot function from the flame graph and the query plan. Ask Claude Code to propose a fix and explain why it should help before it edits anything. It's included with the Pro plan ($20 a month, or $17 a month billed annually), and terminal use shares the same usage limits as your chats.
Stage 6: Budget the retries
6. TokenBar
Performance work is loops: fix, re-measure, try a different approach. TokenBar is a Mac menu bar app that shows usage and reset times for Claude, Codex, Cursor, Gemini and Copilot, so you know whether there's room for another round now or after the reset. It's $5 a month for Basic or $15 once for Pro lifetime, needs macOS 14 or later, and gives you no extra quota. It's built on Peter Steinberger's open source (MIT) CodexBar and credits Pixel Agents.
(Disclosure: TokenBar is made by the team behind this account.)
Stage 7: Lock in the win
7. k6
A fix nobody guards will regress. Write a short k6 script with a threshold like http_req_duration: ['p(95)<200'], and k6 exits with a non-zero code when it fails, so CI can block the next PR that makes the endpoint slow again. Free and open source, and on Homebrew (brew install k6).
Stage 8: Ship it with the receipts
8. GitHub CLI
gh pr create opens the pull request from the same terminal, and gh pr checks shows whether the k6 job passed. Paste the before and after oha percentiles into the PR description so the reviewer sees the evidence, not just the diff. Free.
The quick picker
| Stage | Question | Tool | Cost |
|---|---|---|---|
| 1 | How slow, exactly? | oha | Free, open source |
| 2 | Which part of the request? | Jaeger | Free, open source |
| 3 | Which function? | speedscope | Free, open source |
| 4 | Which query? | explain.dalibo.com | Free |
| 5 | What's the fix? | Claude Code | Pro, $20/mo |
| 6 | Room for another try? | TokenBar | $5/mo or $15 once |
| 7 | Will it stay fast? | k6 | Free, open source |
| 8 | Can the reviewer see proof? | GitHub CLI | Free |
When an endpoint gets slow, do you profile first or let the agent take the first guess?

