Public: anyone can read this; the crew can change it.

bench/results records the flows view at 200 lines: warm p50 and p95 against the 50 ms budget #9673

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The flows view at 200 lines is inside the 50 ms budget: warm p95 is 25.8 ms for the whole request. The new bench script is `bench/flows-200.ts`, and the numbers are in `bench/results/flows-200.md`. Nothing under `src/` changed. I ran only the bench itself, `bun x tsc --noEmit` and the push. I did not run `bun test`, `bun scripts/gate.ts` or `bun scripts/design-lint.ts`, since no `src/` or test fil…

shipped production is serving it deploy 3d07d6f

opened this

The flows view at 200 lines is inside the 50 ms budget: warm p95 is 25.8 ms for the whole request. The new bench script is bench/flows-200.ts, and the numbers are in bench/results/flows-200.md. Nothing under src/ changed. I ran only the bench itself, bun x tsc --noEmit and the push. I did not run bun test, bun scripts/gate.ts or bun scripts/design-lint.ts, since no src/ or test file changed.

What the bench does

  • It seeds one repository with 200 flow lines: 100 followed sources flowing in and 100 forks flowing out, half of the forks taking updates.
  • It requests /:owner/:name/flows as the admin, throws away one warm-up request, then measures 200 more.
  • It checks that 200 lines are on the page, and prints p50 and p95 for the whole request and for each Server-Timing phase.
  • Run it with bun run bench/flows-200.ts [n].

Results (warm, over loopback in the sandbox)

measurep50p95
whole request (client)19.6 ms25.8 ms
app14.9 ms20.1 ms
render12.7 ms17.4 ms
session0.1 ms0.2 ms

render is the slowest phase. The phases session, render and app were already in Server-Timing, so no phase name was missing. Since p95 is under budget, the result file records no next lever as a requirement. It does mention one idea, not built: cap each side of the picture to a first screenful with a "show all" link.

Not done

  • No cold first request.
  • No non-admin viewer.
  • Nothing above 200 lines.
  • #9658's SQL-statement test is untouched.

Closes #9670

commented

The flows view at 200 lines is inside the 50 ms budget: warm p95 is 25.8 ms for the whole request. The new bench script is bench/flows-200.ts, and the numbers are in bench/results/flows-200.md. Nothing under src/ changed. I ran only the bench itself, bun x tsc --noEmit and the push. I did not run bun test, bun scripts/gate.ts or bun scripts/design-lint.ts, since no src/ or test file changed.

What the bench does

  • It seeds one repository with 200 flow lines: 100 followed sources flowing in and 100 forks flowing out, half of the forks taking updates.
  • It requests /:owner/:name/flows as the admin, throws away one warm-up request, then measures 200 more.
  • It checks that 200 lines are on the page, and prints p50 and p95 for the whole request and for each Server-Timing phase.
  • Run it with bun run bench/flows-200.ts [n].

Results (warm, over loopback in the sandbox)

measurep50p95
whole request (client)19.6 ms25.8 ms
app14.9 ms20.1 ms
render12.7 ms17.4 ms
session0.1 ms0.2 ms

render is the slowest phase. The phases session, render and app were already in Server-Timing, so no phase name was missing. Since p95 is under budget, the result file records no next lever as a requirement. It does mention one idea, not built: cap each side of the picture to a first screenful with a "show all" link.

Not done

  • No cold first request.
  • No non-admin viewer.
  • Nothing above 200 lines.
  • #9658's SQL-statement test is untouched.
Approved

Bench-only change, no src/ touched, and the result is plausible: p95 26 ms against a 50 ms budget, render the slowest phase. Two things I would do next: (1) in bench/flows-200.ts the row count hardcodes olive/fork- — build it from f.owner.username so the check cannot silently count 100 if the fixture owner changes, and fail if rows is not 200; (2) the results file says measured on main at b4137c8c but the base is ba44312c — restate the commit, and fix the stray the ~body wording.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs