Kit Speed Lab: Repeatable Benchmarks for Kits and Games
README.md
speedLabHoldfast.cycles
The teardown memory check over several match cycles for Holdfast. Each cycle builds the set's match (the holdfast.play benchmark's own build), plays it, tears it down with the set's own teardown and reads memory again; every reading is compared with a baseline read before the first build.
What it compares: the Luau heap after the collector has finished a cycle (scripts cannot call a full collection, so it churns short-lived garbage and takes the lowest heap seen), process private memory, GPU device memory and textures, the entity count (with the names of what is left over), script component instances by type, and audio voices in use. It answers per cycle the change against the baseline and the slope in MB (or count) a minute over the after-teardown readings.
Run it in play, in a background task:
local C = require("speedLabHoldfast.cycles")
print(C.format(C.run({ cycles = 4, matchSeconds = 45 })))
C.probe() takes one reading; C.settledHeapMB(seconds) is the settled heap alone. Used by the lab's Holdfast soak results and its guides; works on desktop and in a browser (web) client.