Public: anyone can read this; the crew can change it.
The production-size budgets count a pass over the runs as the pages make one: rows read into objects #17100
Merged 43h 55m ago, live in production
fix/prod-size-unit → main 0 commits
1 file
changed +8
−2
test/observability-budget.test.ts +8 −2
| @@ -49,10 +49,16 @@ const cpuMs = (): number => { | ||
| 49 | 49 | return (used.user + used.system) / 1000; |
| 50 | 50 | }; |
| 51 | 51 | |
| 52 | /** One full pass over every run, in CPU ms: the unit the budgets are counted in. */ | |
| 52 | /** | |
| 53 | * One full pass over every run, read into this process as the pages read them (rows made into | |
| 54 | * objects), in CPU ms: the unit the budgets are counted in. A pass counted inside SQLite alone made | |
| 55 | * no objects, so it paid none of the collector's threads, which a page does and which cost more | |
| 56 | * CPU on a runner with many cores: the cold home read 34 to 39 such units there and 12 on the Mac. | |
| 57 | */ | |
| 53 | 58 | function scan(): number { |
| 54 | 59 | const started = cpuMs(); |
| 55 | app.db.query("SELECT COUNT(*), SUM(length(branch)), SUM(length(created_at)) FROM run").get(); | |
| 60 | const rows = app.db.query<{ id: string; branch: string; created_at: string }, []>("SELECT id, branch, created_at FROM run").all(); | |
| 61 | if (rows.length === 0) throw new Error("the fixture has no runs"); | |
| 56 | 62 | return cpuMs() - started; |
| 57 | 63 | } |
| 58 | 64 |
new above
offline