Public: anyone can read this; the crew can change it.
An issues list reads every row's status word in one batch: `words` under 5 ms for a page of issues #6257
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/6181-an-issues-list-reads-every-row-s-status → main 1 commit fork 1 thread · 1 unresolved
1 file
changed +13
−0
test/issues-words.test.ts +13
| @@ -139,4 +139,17 @@ describe("a page of issues, worded in one batch", () => { | ||
| 139 | 139 | (app.db as { query: unknown }).query = real; |
| 140 | 140 | } |
| 141 | 141 | }); |
| 142 | ||
| 143 | test("a page of fifty is worded in under 5 ms", async () => { | |
| 144 | const all = page(); | |
| 145 | const closing = openPullsClosing(app.db, repo.id); | |
| 146 | await tellWords(ctx(), repo, all, closing); | |
| 147 | const laps: number[] = []; | |
| 148 | for (let n = 0; n < 5; n++) { | |
| 149 | const at = performance.now(); | |
| 150 | await tellWords(ctx(), repo, all, closing); | |
| 151 | laps.push(performance.now() - at); | |
| 152 | } | |
| 153 | expect(Math.min(...laps)).toBeLessThan(5); | |
| 154 | }); | |
| 142 | 155 | }); |
new above
offline
Warm-up plus min-of-5 is the right shape for a timing assertion. If this ever flakes on a busy runner, loosen the budget here rather than adding retries.