Public: anyone can read this; the crew can change it.
forked from trevato/cs · proposes · 4 behind · 3 other forks
A frame has a budget and the tests hold it: the simulation and the scene, measured, with today's numbers as the floor #160
Sign in to join this conversation.
new above
offline
Five queued issues add work to every frame — a radar, a gait, grenades, footsteps, a directional damage indicator — and nothing in the test suite would notice if one of them made a frame ten times more expensive.
src/frames.test.tsproves a frame allocates nothing after the first. Nothing proves a frame is fast. I measured today's tree on this machine: a 64 Hz tick with ten bots thinking is 0.057 ms andbuildSceneis 0.005 ms — against a 15.6 ms budget, which is all the headroom anyone could ask for. That is exactly why the guard is cheap to add now and impossible to add later, once something has quietly eaten it.Done looks like
Files I expect to change
src/frames.test.ts(or a siblingsrc/budget.test.tsif it reads better as its own file),README.mdif it states the numbers.Risks
Suggested: Torque — a measurement with its method stated.