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

Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:2hwyx3x8nx is past its budget: trevato/forge: "/map on the forge-sized fixture, warm > (unnamed)" failed on 3 pulls in the last hour — the lane's red,… #3064

Merged opened this

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

Merged

scout/forge:scout/3060-sentinel-shared-01m23vygyffx5hg2f5vm8r74 → main 1 commit fork

  • Merged. scout/3060-sentinel-shared-01m23vygyffx5hg2f5vm8r74 was merged into main as e97dc9f.

Review

Sign in to review this change.
1 file changed +15 −10
test/map-cache.test.ts +15 −10
@@ -72,9 +72,15 @@ describe("/map on the forge-sized fixture, warm", () => {
7272 // Both viewers share one cache, so drop it here: the first request is a
7373 // real cold build for this viewer, whichever test ran before.
7474 clearMapCache();
75 const coldStarted = performance.now();
76 const warm = await get(servers, "/map", cookie);
77 const cold = performance.now() - coldStarted;
75 const coldCounter = countStatements(f.app.db);
76 let cold: number;
77 let warm: string;
78 try {
79 warm = await get(servers, "/map", cookie);
80 cold = coldCounter.count;
81 } finally {
82 coldCounter.stop();
83 }
7884 const lanes = lanesIn(warm);
7985 expect(lanes).toBeGreaterThan(5);
8086 const counter = countStatements(f.app.db);
@@ -93,17 +99,16 @@ describe("/map on the forge-sized fixture, warm", () => {
9399 }
94100 times.sort((a, b) => a - b);
95101 const p95 = times[Math.ceil(times.length * 0.95) - 1]!;
96 const median = times[times.length >> 1]!;
97102 // The steady state: a lane's minute or the UTC day turning over mid-loop
98103 // rebuilds one request, and that is the cache working, not failing.
99104 counts.sort((a, b) => a - b);
100105 const statements = counts[counts.length >> 1]!;
101 console.log(`${who}: ${lanes} lanes, p95 ${p95.toFixed(1)} ms, ${statements} statements`);
102 // Wall-clock is the check machine's, so it is only ever a ratio between
103 // two timings taken here, a real cold build and the warm median: a
104 // missing cache puts them level. The doc's 50 ms budget is read off
105 // bench/map-home.ts. p95 below is a hang guard, nothing more.
106 expect(median * 3).toBeLessThan(cold);
106 console.log(`${who}: ${lanes} lanes, p95 ${p95.toFixed(1)} ms, ${statements} statements (cold ${cold})`);
107 // Wall-clock is the check machine's load, so the verdict is read from
108 // statement counts, which depend only on the code: a missing cache
109 // puts the cold and warm counts level. The doc's 50 ms budget is read
110 // off bench/map-home.ts. p95 below is a hang guard, nothing more.
111 expect(statements * 3).toBeLessThan(cold);
107112 expect(p95).toBeLessThan(5_000);
108113 // The page's own chrome costs a fixed ~25 statements (session, settings,
109114 // the repository lists); a lane costs at most two. Cold, it was ~2,700.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs