Repository navigation
Measure allocation windows and reject invalid profiling evidence - #140
Merged
Merged
Conversation
#14) Add benchmark-only allocation counters, exact frame windows, real WASM export checks, and corrected profile evidence. No production renderer or loader change. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
6 tasks
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.
Purpose
Related issue: #14 (partial; keep open).
Measure Rust/WASM allocations with real counters. Reject invalid profiling evidence.
Change
Add a benchmark-only counting allocator. Share its implementation between the native experiment and the browser fixture. Do not change production allocation or rendering.
Capture allocation snapshots at exact frame boundaries. Validate signed byte deltas, adjacent windows, real framebuffer pixels, and source hashes. Reject timing builds with actual
alloc_profile_exports. Add regression tests for these faults.Record corrected measurements and the review of not-fl3#682 and not-fl3#691. Keep superseded claims visible and identify the current results.
Delivery source:
76e4ba39d0e77610127acc91d7390ba12fe97e7a.Base:
a37a7040a076a6a9695caae0ba5ad2d2bf327b88.Tests
npm run ci:local07dab430bdd75b4a2f8dc0d2bec34f1f59c6842d. Root 10, drawing 41 plus 1 doc-test, voxel 88, and Node 21 plus 219 passed. Chromium: 56 smoke cases plus 2 drawing-consumer cases passed.cargo test --manifest-path experiments/allocation-profile/Cargo.toml -- --test-threads=1cargo fmt --manifest-path experiments/allocation-profile/Cargo.toml -- --checkrustfmt --check examples/browser_perf.rsnode --test tests/*.test.cjs tests/profile-browser.test.mjs8000 td>node --check scripts/profile-browser.mjsnode scripts/check-docs.mjsgit diff --cached --checkThe local CI run used Linux arm64 in Docker, Chromium
141.0.7390.37, and SwiftShader. The profiling run used the shared macOS arm64 host. Measurement source:022ca9049cd6fc3422fa7ab5360c226053f9c9e5. Receipt SHA-256:e638b35b1004550c4b5b09c88f5f2394785a8b8a5ea5741be52078f4850d8709.All runtime source files are byte-identical to the local CI source. The delivery changes only a documentation path substitution, a current-evidence note, and one trailing blank line in a test. Historical measurement commits and raw receipts remain local; committed file hashes identify the measured code.
An earlier local CI attempt stopped with
SIGPIPE; the completed rerun passed. The native allocator tests need--test-threads=1because they observe the process-wide allocator. Earlier parallel test attempts failed. The legacy repository-wide rustfmt step also failed; the existing workflow marks it non-blocking. Formatting checks on the changed Rust files passed.Firefox, WebKit, native graphics, mobile devices, and a dedicated reference device were not tested for this measurement. No speed gain, general leak freedom, release qualification, or production optimization is claimed.
Risk and rollback
The allocator is experimental and needs the documented build flag. Separate target directories prevent an instrumented build from replacing a timing baseline. CDP heap sampling does not attribute Rust/WASM allocation counts.
Revert this PR to remove the experiment and profiler changes. Production renderer and loader files are unchanged. Keep #14 open for its remaining acceptance conditions.
Controlled-English review
The unchecked item records the explicit replacement of a machine-local absolute path with
$PLAYWRIGHT_ENTRYin public command excerpts. Test results and source hashes did not change.See MADR 0003.