Kit Speed Lab: Repeatable Benchmarks for Kits and Games
README.md
speedLab: repeatable speed benchmarks for kits and games
Version 0.2.28.
speedLab runs a range of benchmarks for a kit or a game with one action and answers one row per
benchmark: median and 95th percentile frame time, engine CPU and GPU time per frame, script time
per frame, process memory and GPU memory, players connected, and the benchKit report id for the
full detail. Every number comes from benchKit (installed with it), so a run here and a run
with zero benchKit run measure the same way.
A kit's benchmarks ship as a set: a module that calls Lab.register with a range of
benchKit definitions, each tagged: quiet (an idle scene), play (normal play), stress (a
heavy load), still (fixed views), fly (a camera fly-through), 1p / 2p (one player, or a
second player connected to the same room), soak (five minutes of play with memory sampled, so the
row shows whether memory stays flat), and kit tags such as a water look or an enemy count.
The sets
| Set | Kit or game | Scenarios |
|---|---|---|
speedLabSpawner | spawnerKit enemy spawners and pooling | quiet, play, stress, worst (160 parked and 160 active churned), still, fly at 20 / 80 / 160 enemies |
speedLabTidewater | Tidewater water and waves, with the Tidewater showcase run | quiet, play, stress, worst (the showcase), still, fly, one per water look |
speedLabArtsTd | Arts TD tower defense | quiet, play, stress at 20 / 80 / 160 enemies, worst (24 towers, 8 fused, 160 enemies), still, fly, the media gallery |
speedLabPrefixKit | prefixKit enemy nameplates (Named Foes; drawn in Arts TD) | light (10 enemies), typical (40), stress (120), 2p (two lanes as two players' waves); nameplate rebuild, plate trees sent, UI preparation and whole frame, desktop and browser |
speedLabCloudburst | Cloudburst weather | quiet (clear sky), play, stress, worst (night thunderstorm at ultra), still, fly, snow, fog, pixel rain |
speedLabTinkerYard | Tinker Yard physics sandbox (physicsSandboxKit) | quiet, play, stress (250 props), worst (glued block of 96 crates under a 2 t weight), still, fly |
speedLabGameNight | Game Night card, dice and board games | quiet, play, stress, worst (eight tables, 400-space boards, 20 dice), still, fly |
speedLabLanebreak | Lanebreak endless runner (runnerKit) | quiet, play, stress (seven lanes), worst (top speed), still, fly |
speedLabFinalRound | Final Round 1v1 fighting game (versusKit) | quiet stage, normal match, stress (four fights of hit effects), worst (six caged fights throwing supers), still, fly |
speedLabSkyhook | Skyhook co-op sky-island race (skyhookRace, stormFrontKit) | quiet islands, play (storm far behind), stress (storm wall from 70 m), worst (the wall from 25 m in the storm section), still, fly |
speedLabHoldfast | Holdfast co-op wave survival (survivalArenaKit, buyStationKit) | quiet farmstead, play, stress, worst (the last wave, the boss, windows re-nailed so boards keep breaking), still, fly |
speedLabHoldTheLine | Hold the Line ten-wave tower defense (towerDefenseKit, turretsKit, creepsKit) | quiet map, play (wave 5), stress (The Horde, twelve towers), worst (wave 10, the Warlord, eighteen tier-3 towers firing), still, fly |
speedLabLowWater | Low Water first-person survival horror storm night (lowWater, Cloudburst, floodKit, Tidewater) | quiet control house, play (the dam crest in the storm), stress (the storm at ultra over the drowned village), worst (the finale: the reservoir surging back, beacons, siren and the Lowman in the stormiest weather), still, fly |
speedLabAfterglow | Afterglow Live rhythm game on a live stage (encoreStage, Downbeat, pulseRig) | quiet song select, play (a middle song on normal), stress (the busiest song on hard), worst (its busiest 16 s at full stage energy, every laser, a burst on every bar, the full crowd), still, fly |
speedLabCrossroads | Crossroads Tales story adventure, The Silent Bell of Bellbrook (adventureKit, mossbrook, townsfolkKit) | quiet village at noon, play (before the fair), stress (the harvest fair with everyone out, the journal open), worst (the fair in Bellbrook square with the bell's story beat, the journal and story notes at once), still, fly |
speedLabCrumpleZone | Crumple Zone crash test dummy simulator (crashCars, crashObstacles, crashRig) | quiet test track, play, stress, worst (the saloon into the bollard at 50 km/h, the crash window), still, fly |
speedLabTurretsKit | turretsKit turrets and towers firing into a crowd | quiet, play at small / medium, stress, worst (a big crowd with every turret firing), still, fly |
speedLabCarForge | Car Forge procedural cars and traffic fleet (carForge, vehiclesKit) | quiet, play (normal traffic), stress, worst (maximum traffic), still, fly; each also as a browser variant |
Every set carries the same full range: the scenarios above, each with one player (1p) and two
players (2p), a five-minute memory soak (soak), and every benchmark at desktop settings and at
tablet settings (desktop / tablet), so any set runs the same way. A test checks it.
Each game set carries a README, its kit's before and after numbers (results), a how-to guide in
plain words and an example guide that walks start to finish through speeding that game up.
Run them (one action)
zero speedLab list every set this world has installed
zero speedLab run speedLabSpawner every benchmark of the spawner set
zero speedLab run speedLabSpawner stress only those tagged stress (or one by name)
zero speedLab run speedLabCloudburst.set desktop the Cloudburst weather set at desktop settings
From Luau, inside a task:
local Lab = require("speedLab.lab")
require("speedLabSpawner.set") -- registers the set
local rows = Lab.run("spawner", "2p")
print(Lab.format(rows))
Two-player benchmarks measure on the player who runs them; start a second player in the same room first (a sub-client in play, a second device, or a friend) and run it on the joining player for the cost a guest pays.
A soak benchmark states capture = "memory" and runs Lab.SOAK_SECONDS (300 s) once. Its row
carries memPerMin, scriptMemPerMin and gpuTexPerMin (MB per minute, fitted over the measured
part) and leak ("pass" or "FAIL" after teardown); Lab.flat(row) reads "flat" while the game's
script VM and GPU textures grow under Lab.FLAT_MB_PER_MIN (1 MB a minute), and Lab.format
prints that verdict on the row. Process memory is shown but does not judge it: on a shared machine
it moves with other programs.
A set can also check that memory comes back after teardown: give the soak benchmark a
memoryBack function answering { pass, heapBeforeMB, heapAfterMB, growthMB, limitMB, waitedS, enemiesAlive, setLeftovers } (read in its own build and teardown). Lab.row copies it onto the row as
memoryBack, and Lab.format prints "memory back after teardown pass" or "FAIL" with the figures. The
Holdfast soak does: it reads the game's script heap before the build, polls it for up to 60 s after
teardown (benchKit's own read waits at most 8 s), and counts the enemies and its own entities left.
In a browser
- A set can carry browser variants (tag
browser, a name ending.browser, budget web60) with the settings a browser player gets; each has a desktop twin of the same name. Run them in a browser client (a web sub-client,zero client create --target web, or the published web player):zero speedLab run <set> browser, or the board's Run browser button, which shows on a card whose set has them. Car Forge's set is the first. - A run that died halfway can leave benchKit saying "a benchmark is already running on this
machine":
require("benchKit.runner").reset()frees its lock. - A benchKit run in a web engine sometimes leaves no report (a long loop once ended the web engine
with a wasm trap). Measure the same view for the same time with the profiler toolbox instead
(
zero profiler cost 6,zero profiler scripts,zero profiler frame) and say which tool each number came from.
Make a set for your own kit
local Lab = require("speedLab.lab")
return Lab.register {
id = "myKit", title = "My kit", kit = "myKit",
benchmarks = {
{ name = "myKit quiet", tags = { "quiet", "1p" }, seed = 1, budget = "desktop60",
build = function(ctx) end, segments = { { name = "idle", duration = 6, views = { { pos = { 0, 10, -20 }, look = { 0, 0, 0 } } } } } },
},
}
Each entry is a plain benchKit definition (see benchKit's README) plus tags and an optional note.
Guides
how-to-measure-how-fast-my-kit-or-game-runs: the method, every number, two runs each.example-making-a-tower-defense-or-water-level-run-smoothly-on-a-tablet: a worked example.example-profile-and-speed-up-a-small-game-with-benchmark-sets: start to finish on Game Night's tableKit fix: pick a set, measure, find the cost, fix, measure again, soak, publish the numbers.
Why the package is called speedLab
The world is Kit Speed Lab; the package keeps the shorter name speedLab because every set and
every install reaches it by that name: require("speedLab.lab") in each set, the zero speedLab
command, and the speedLab<Kit> set packages. Renaming it would break each world that installed
it and every set already published. Search for "kit speed lab" finds it either way.
Speed round 16 (2026-12-02 to 12-04): what got faster
Measured before and after on desktop and in a browser, twice each side; each set's results holds the rows and each game world a re-runnable script.
| Kit or game | Fix (release) | Before -> after |
|---|---|---|
| Arts TD, changing map | scenery props spawn 4 a frame instead of ~65 at once (Arts TD 1.0.2) | slowest session tick 199 -> 27 ms desktop (-86%), 275 -> 53 ms browser (-81%) |
| Game Night dice landing | roll labels reused and drawn at 64 px (diceKit 1.0.11) | worst tray update ~800-1000 -> 83-127 ms desktop, 911 -> 4-10 ms browser |
| Game Night dice clatter | impact sounds play through kept players (diceKit 1.0.12) | 10.5 / 12.6 -> 0.75 / 1.0 ms a second desktop, one roll's sounds 61 / 93 -> 7 / 5 ms browser (about -92%) |
| Game Night board sounds | hops and landings play through kept players (boardKit 1.0.14) | 2.65 / 3.30 -> 0.70 / 0.40 ms a second desktop (-82%), 0.87 -> 0.095 ms a sound browser (-89%) |
| Game Night seated players | the sit pose holds without its animation player (tableKit 1.0.15) | up to 16 ms a frame -> 0 in browser sessions that ran it in script; desktop already native |
| Hold the Line path placement | placement no longer resamples the whole road per spawn (spawnerKit 1.2.13) | worst wave 27.2 / 23.5 -> 0.66 / 0.71 ms a second desktop, 22.9 / 18.4 -> 0.79 / 0.58 browser (about -97%) |
| creepsKit tick loop | one tick loop per register (creepsKit 1.3.13) | one loop before and after in every fresh run: no speed claim, kept as a safety fix |
| Tidewater FX bow spray | measured | stays on the GPU, one build, no per-frame cost: nothing to fix |
The lab now measures the newest of each: towerDefenseKit 1.2.44 with wavePreviewKit 1.1.11 and creepsKit 1.3.13 (reviewed, REVIEW-round16.md in Hold the Line), gameNight 0.2.8 (diceKit 1.0.12, boardKit 1.0.14, tableKit 1.0.16, cardsKit 1.1.4) and Tidewater 1.2.22.
Version history
-
0.2.28: speed round 16 numbers (the section above). The lab takes towerDefenseKit 1.2.44 / wavePreviewKit 1.1.11 / creepsKit 1.3.13, gameNight 0.2.8, @tidewater deb1c2c (Tidewater 1.2.22) and the Builtin Library 9ebd3eb. Carries speedLabArtsTd 0.1.17, speedLabHoldTheLine 0.1.11, speedLabGameNight 0.1.6, speedLabTidewater 0.1.3 and speedLabCloudburst 0.1.6. No change to how runs measure.
-
0.2.27: the lab moves to the Builtin Library 36983fc (the engine's current one; on ac8e121 the lab was hidden from players again). The sets table names
speedLabPrefixKit, the round 15 nameplate set. No change to how runs measure. -
0.2.26: the lab moves to the Builtin Library ac8e121 (the engine's current one; on f8da623 the lab was hidden from players again after the engine update). No change to how runs measure.
-
0.2.25: the lab moves to the Builtin Library f8da623 (the newest this engine runs; a world on an older one is hidden from players). No change to how runs measure.
-
0.2.24: browser variants. A set may carry a
browsertwin of a benchmark (run it in a browser client: a web sub-client or the published web player); the full-range test accepts it beside its desktop twin, and the board shows a Run browser button for sets that have them. Carries speedLabCarForge 0.1.2 (a browser variant of every Car Forge benchmark, browser rows on Car Forge 0.3.10, a how-to guide and an example guide). Tests 13/13 twice. -
0.2.23: carries speedLabCarForge 0.1.1; the lab takes Car Forge 0.3.10 and vehiclesKit 1.2.11 (Car Forge opens fresh with zero errors). No change to how runs measure.
-
0.2.22: carries the round 14 sets and rows: the new speedLabCarForge 0.1.0 (Car Forge traffic, 16 benchmarks; the lab installs carForge 0.3.8 and vehiclesKit 1.2.9 for it), speedLabHoldTheLine 0.1.8 (towerDefenseKit 1.2.42, browser host and desktop; the worst wave reads the rules through the kit api), speedLabLowWater 0.1.6 (Tidewater FX spray off the CPU), speedLabAfterglow 0.1.5 (encoreStage 1.2.2 groove meter), speedLabSkyhook 0.1.1 (skyhookRace 1.5.6). The lab takes controlsKit 1.4.15 and skyhookRace 1.5.6 (its old controlsKit 1.4.10 copy, which failed to load, is gone). The sets table lists all 17 sets. No change to how runs measure.
-
0.2.21: the lab takes mossbrook 1.0.18 (uninstalled and installed fresh: its old nested questKit and navUiKit copies named older releases, so it could not be updated in place), navUiKit 1.3.30, and installs crashRig 0.4.15 from Crumple Zone for the new speedLabCrumpleZone 0.1.0 set (16 sets). speedLabCrossroads 0.1.7 names mossbrook 1.0.18. Seven unused copies removed.
-
0.2.20: carries speedLabHoldTheLine 0.1.6 (Hold the Line browser runs with the browser as host and a second player joined on the desktop: world clock -56%, Commander no gain as host) and the showcase scene saved at its current authoring revision (no code change).
-
0.2.19: the lab takes towerDefenseKit 1.2.35 (creepsKit 1.3.7 and spawnerKit 1.2.11 on SecondWind 1.4.19: no SecondWind 1.4.11 copy left in it; a browser playing Hold the Line alone finishes every wave), for speedLabHoldTheLine 0.1.5 (like-for-like browser pair with the client running the match alone: Commander -85%, world clock -95%).
-
0.2.18: the lab takes mossbrook 1.0.8 and questKit 1.0.37 (Crossroads without the save line at load; the Crossroads set now measures the released version), and the hall scene saved whole again after the stale copy was cleared (no code change).
-
0.2.17: the lab hall's saved scene is the whole hall again (rebuilt after the stale quick geometry copy was cleared; no code change). The lab installs turretsKit 2.3.7 as its own record for the new speedLabTurretsKit set.
-
0.2.16: script time leaves out the lab's own measuring task also when the profiler names that column by its key alone (one Afterglow board run still listed
script.speedLab.measure, 11.7 ms). The lab takes animatedMaterials 1.0.22 (through its encoreStage install): two older animatedMaterials clocks rescanned 28 materials every frame in the hall, about 22 ms a frame each, which is most of why the board's Afterglow worst case read 53 to 68 ms. Version note: 0.2.15-rc.2 was pushed twice on the round 7 branch with different contents; read that number as withdrawn. Releases now go straight from main, with no draft versions on branches. -
0.2.15: runs measure what they say. Script time leaves out the lab's own measuring task (it read up to 3.6 ms a frame inside a run and made script time jump). The board has a "Run worst" button and shows only the tags a set has. It says plainly that a Run measures the lab hall, where a set builds its own stage, and that a game's own numbers come from installing its set into the game's world. The set registry survives a reload of the lab module. After a Run the lab clears old pinned copies of the quick geometry nouns that some kits place (they left the hall half built: platform issue 01M8PD64S6NK9Z4R34GA674THV) and rebuilds the hall. The lab installs controlsKit 1.4.12, Downbeat 1.3.4, towerDefenseKit 1.2.31 and Low Water 1.0.13 as its own records. New
speedLab.cycles(moved from speedLabHoldfast, now for any set): builds a benchmark's match, plays it, tears it down and compares memory against a baseline over several matches. New test (14 in all). -
0.2.14: the board shows every number a set publishes: each row lists all the metrics it holds (screen layout ms, MB a minute, shadow passes and the like, not only the seven fixed columns), two or more runs read "a / b" with the change worked out from their means, rows with only before or only after runs say so, and written notes show as written; the device line wraps inside the panel. A new test fails if any published value would read "-". The set table lists all 14 sets.
-
0.2.13: a set can check that memory comes back after teardown: a benchmark's
memoryBack()answer rides its row (row.memoryBack) andLab.formatprints "memory back after teardown pass/FAIL"; the Holdfast soak (speedLabHoldfast 0.1.3) is the first to use it; a test checks it. The README version line matches the package again. -
0.2.12: the Crossroads Tales set (speedLabCrossroads 0.1.0) ships; the full-range test covers it; the set table lists all 13 sets.
-
0.2.11: the Low Water set (speedLabLowWater 0.1.0) and the Afterglow Live set (speedLabAfterglow 0.1.0) ship; the full-range test covers both; the set table lists every set.
-
0.2.10: the Hold the Line set (speedLabHoldTheLine 0.1.0) ships; the full-range test covers it.
-
0.2.9: the Holdfast set (speedLabHoldfast 0.1.0) ships; the full-range test covers it.
-
0.2.8: the board and the list carry all nine shipped sets (Skyhook added); a test checks that every set carries the full range (quiet, play, stress, worst, still, fly, 1p, 2p, a five-minute soak, each with a desktop and a tablet twin); the guides of every set are published as guides.
-
0.2.7: soak benchmarks. A benchmark's own
capturelevel is honoured (a soak states "memory"; before,Lab.runalways asked for "frames"), rows carry memory growth per minute and the leak verdict,Lab.SOAK_SECONDS,Lab.FLAT_MB_PER_MINandLab.flat, andLab.formatprints the memory verdict. Sets for Tinker Yard, Game Night, Lanebreak and Final Round (0.1.0) ship beside it; the Skyhook set and the Tidewater showcase set follow in the next patch. An overall example guide, the README and the how-to guide list every set and the browser caveats. The test that checks the board lists every shipped set covers the new ones. -
0.2.6: the board and the catalog, list, run and measure tools find every installed set by listing the package folders in the VFS (this world's own, deps/ and libs/) and resolving each
set.modulewithasset.tryResolve, instead of a fixed list of three names; asset.exists answers false inside packages on the current engine (engine bug #23682) and is not used. The Cloudburst set now shows on the board. A test checks the board lists every shipped set (spawner, tidewater, artsTd, cloudburst). -
0.2.5: the showcase hall has a floor you can stand on (a static collider under the floor; before, a player pressing play fell forever); runs against the current @builtin (menusKit and controlsKit load cleanly). A Cloudburst set ships beside it as
speedLabCloudburst. -
0.2.4: every results module carries a tablet note shown in red on the board: no kit has been measured on a real tablet yet; rows named "desktop at tablet settings" ran on a desktop at render scale 0.75.
-
0.2.2: sets are found in any world, edit-mode runs throw their changes away, a board with numbers, tests, the Tidewater set.
-
0.2.0: the showcase scene and board, the catalog and measure tools.