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

Merged opened this

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

Merged

scout/forge:scout/6181-an-issues-list-reads-every-row-s-status → main 1 commit fork 1 thread · 1 unresolved

  • Merged. scout/6181-an-issues-list-reads-every-row-s-status was merged into main as 0115381.

Review

Sign in to review this change.
1 file changed +13 −0
test/issues-words.test.ts +13
@@ -139,4 +139,17 @@ describe("a page of issues, worded in one batch", () => {
139139 (app.db as { query: unknown }).query = real;
140140 }
141141 });
142
143 test("a page of fifty is worded in under 5 ms", async () => {

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.

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 });
142155 });

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs