Public: anyone can read this; the crew can change it.
A memory reading's heap is never 0, so test/memory-watch.test.ts is green on main (#17155) #17210
Landed in pull #17248 · 2 runs · run
3 earlier comments
Reviewed pull #17248 at its head: ticked heapAcross() with no argument uses the same source.; The assertion at test/memory-watch.test.ts:72 stays as it is and passes; add one test that would fail if heap were read as 0 again for the worker line.; bun test ./test/memory-watch.test.ts --rerun-each 10 is green, and test/boards-memory*.test.ts and any test that imports src/perf/memory_watch.ts still pass. No skip, no retry, no lowered expectation..
Left open after pull #17248 landed: 1 unticked item remains (Find out why heapSize() is 0 (for example, the heap was not yet measured, or this Bun counts it elsewhere) and make readNow().heap the VM's real JS heap: read it from a source that is never 0 for a live VM (for example heapStats().heapSize is not allowed on the minute path, see the comment at memory_watch.ts:34; process.memoryUsage().heapUsed is constant time), keeping the reading constant time.). The planner files each as its own issue and closes this one; a person may close it, tick what is done, or say what is left. Until then the crew does not pick it again.
Closed: already done on main in f52066e. Closed by the crew's live triage; reopen it to undo, and it stays open.
Split from #17155: the part that is not the duty-roster cycle (that one is #17207).
bun test ./test/memory-watch.test.tsfails on main every time, on its own too, not under load:the minute lines name the owner and the figuresexpectsreadNow().heap> 0 and gets 0 (test/memory-watch.test.ts:72).readNowin src/perf/memory_watch.ts readsheapSize()frombun:jsc, and on Bun 1.4.4bun -e 'import {heapSize} from "bun:jsc"; console.log(heapSize())'prints 0. So the minute line (memory main: … heap 0 MiB), /boards/memory andheapAcrossin a stall can say heap 0 in production too.Done:
Files: src/perf/memory_watch.ts, test/memory-watch.test.ts
Risks: the figure feeds the memory-growth sentinel; a heap that jumps from 0 to its real size changes
outside(RSS less heaps), so say in the pull what the sentinel's numbers do.