[M1-ECS-07] ECS stress + memory accounting test - #23
Merged
Merged
Conversation
Roadmap step M1-ECS-07 (roadmap/M1-heartbeat.md), scope only.
Stress test (new EcsStress suite, CTest entry ecs_stress):
10k entities at the 100% scene budget, 6 registered component types,
10k frames of add/remove churn. Each frame: beginFrame() drives the
G-R3/G-R4 guardrails, 64 seeded Tag adds + 64 Tag removes (cyclic
permutation, default 256 churn budget never exceeded), then one
each<Pos, Tag> iteration (Read, Read) with visit count + 64-bit
FNV-1a checksum. A 700-frame warm-up (one full 625-frame cohort
period + margin) lets every archetype's columns reach their high
water before the measured window.
Verified properties (the step's Scope):
- no leaks: green ctest -R ecs_stress in the ASan tree (leak check),
40/40 on build-asan
- pool high-water stable: zero totalReservations/totalArchetypeGrowth
delta across the 10k-frame window (high water: 9 archetypes,
24592 reserved rows, 549024 bytes)
- iteration within the documented cost (query.h): window-wide
ns-per-visit throughput floor (600 ns; measured 58.7 ns g++ /
72.3 ns clang++ on the -O0 Debug trees)
- zero-allocation window (test-only operator-new counter,
non-sanitizer trees; sanitizer trees: leak-free run + delta)
- guardrails silent in the window (churnWarns delta 0; the 100%
entity-budget warn fired once at setup and never re-crosses)
Memory accounting (PRD 8.1 base memory, accounted bytes): 110000
entity bookkeeping bytes + 549024 reserved row bytes at the 100%-full
scene; machine-greppable ecs-stress {window,iteration,memory} lines on
every ctest run. Baseline recorded in
docs/benchmarks/baselines/m1-ecs-stress.md (AGENTS 12 fields; not a
budgets.json workload - no measured field updated).
Determinism spot check: the window/memory lines are byte-identical
across g++ 16.2.1 and clang++ 22.1.8 (pure integer workload).
Local verify: ctest -R ecs_stress green on build (Debug g++),
build-asan (required Verify; 37.7s leak-free), build-release,
build-clang, build-tsan, build-shared; full laige-sim suite 40/40 on
build/build-asan/build-clang; zero new warnings under NFR-8.10.
Progress board: M1 5 -> 7 (M1-ECS-06 row lands in the same PR; it
merged without updating the board or change log).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements roadmap step M1-ECS-07 · ECS stress + memory accounting test (scope only; no other changes).
What
New
EcsStresssuite inlaige-sim_tests(CTest entryecs_stress, added to the TSan property list):beginFrame()drives G-R3/G-R4, then 64 seeded Tag adds + 64 Tag removes (cyclic Fisher-Yates permutation,TestPrngsubstream 1008; 128 ops/frame — the default 256 G-R4 budget is never exceeded), then oneeach<Pos, Tag>iteration (Read, Read) with visit count + 64-bit FNV-1a checksum.Verified properties (the step's Scope)
ctest -R ecs_stressgreen onbuild-asan(37.7 s, no ASan/UBSan report)totalReservations/totalArchetypeGrowthdelta across the 10k-frame window== 0); sanitizer trees: leak-free run + deltaecs-stress window/iteration/memorylines on every ctest runThe window/memory lines are byte-identical across g++ and clang++ (pure integer workload, ARCH-010) and across repeated runs. No new guardrail warns in the window (churnWarns delta 0; the entity-budget warns fire once at setup and never re-cross).
Baseline
Second baseline file:
docs/benchmarks/baselines/m1-ecs-stress.md— full AGENTS §12 metadata, verbatim runs (canonical, ASan, cross-compiler), cross-tree results. Not abudgets.jsonworkload, so nomeasuredfield is updated. Baselines index + benchmarks README updated to match.Local verification
ctest -R ecs_stressgreen onbuild(Debug g++, 14.7 s),build-asan(required Verify),build-release,build-clang,build-tsan,build-sharedbuild,build-asan,build-clang;laige-sim_tests+ecs_stressgreen on the other treeslaige-api.jsonunchanged, 452 symbols —api-real-treegreen); no include-graph changeNote
This PR also adds the retroactive M1-ECS-06 row to the roadmap change log (and the matching board counts, M1 5→7 / total 27→29): M1-ECS-06 merged (
675fb94, #22) without updatingroadmap/README.md. Same pattern as the M0 retro rows.