I shipped a Goated tool Today: API Performance Profiler.
It answers one question backend devs ask every day: how fast is this route, actually?
Most of us guess. Or we add console.time, or we open Postman and eyeball the number. Then we ship, and production tells us the truth.
So I built something that measures instead:
npm install @api-profiler/express
app.use(profiler());
That's the whole setup. Send a few requests, then open a second terminal:
npx api-profiler
and you get a live table: every route, average latency, max, error rate, req/s, 🟢🟡🔴.
The part I'm actually excited about: the middleware sees the real request — the working auth token, the path param that exists in your DB, the body the route accepts. It records it (in memory, masked, never written anywhere) and can replay it under load:
npx api-profiler run GET /users/:id
Hit the route once, it replays it a few thousand times, and reports the route's own server-side numbers for the run. No k6 script, no fake fixtures, no copying tokens around.
Rules I refused to bend while building it:
A number that wasn't measured is never shown. Not enough samples → --.
Latency and throughput are never mixed up.
Load tests are off in production, localhost only, GET only unless you opt a route in. Replaying a POST writes real data.
Nothing leaves your machine. No account, no telemetry, no server.
Works with Express 4/5 and NestJS on the Express adapter. A VS Code extension that shows 🟢 84ms right next to the route line is packaged and coming to the marketplace this week.
Open source, AGPL: https://github.com/Nahid625/api-performance-profiler
npm: https://www.npmjs.com/package/@api-profiler/express
If you try it on a real project and something is wrong, open an issue. I'd rather hear it now.
Top comments (0)