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

Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:b0moizyi5c is past its budget: trevato/forge: "a warm rank of 500 public repositories is a fraction of a cold one and within its budget" failed on 4 p… #12583

Merged opened this

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

Merged

mason/forge:mason/12580-sentinel-shared-01m23vygyffx5hg2f5vm8r74 → main 1 commit fork 1 thread · 1 unresolved

  • Merged. mason/12580-sentinel-shared-01m23vygyffx5hg2f5vm8r74 was merged into main as a2f980a.

Review

Sign in to review this change.
1 file changed +12 −11
test/explore-rank.test.ts +12 −11
@@ -98,18 +98,19 @@ afterAll(async () => {
9898 const query = parseExploreQuery("");
9999
100100 test("a warm rank of 500 public repositories is a fraction of a cold one and within its budget", async () => {

The title promises a budget the test no longer checks. Rename it to match the statement-count ratio.

101 const cold: number[] = [];
102 const warm: number[] = [];
101 // Work done, not wall-clock: a timing ratio flips with the check machine's load (#12580).
102 // A cold rank reads the repositories; a warm one only the write clock.
103103 await explore(app, undefined, query);
104 for (let i = 0; i < 5; i++) {
105 let t = performance.now();
106 await explore(app, undefined, query, Date.now());
107 cold.push(performance.now() - t);
108 t = performance.now();
109 await explore(app, undefined, query);
110 warm.push(performance.now() - t);
111 }
112 expect(Math.min(...warm) * 5).toBeLessThan(Math.min(...cold));
104 const cold = countStatements(app.db);
105 await explore(app, undefined, query, Date.now());
106 const coldN = cold.count;
107 cold.stop();
108 const warm = countStatements(app.db);
109 const rows = await explore(app, undefined, query);
110 const warmN = warm.count;
111 warm.stop();
112 expect(rows.length).toBe(60);
113 expect(warmN * 5).toBeLessThan(coldN);
113114 });
114115
115116 test("a cold rank runs many statements, a warm one only the write clock", async () => {

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs