Skip to content

feat: add native and browser performance measurement harness - #4

Merged
softmarshmallow merged 1 commit into
mainfrom
feature/performance-harness
Oct 2, 2026
Merged

softmarshmallow merged 1 commit into
mainfrom
feature/performance-harness

Conversation

@softmarshmallow

@softmarshmallow softmarshmallow commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds a repeatable way to measure native and browser viewport work before changing performance-sensitive code. The harness builds the production hosts, warms up a fixed camera workload, preserves raw frame evidence, and produces CLI/JSON comparisons across independent runs.

  • Define three measured scopes: the full editor, the viewport with editor projection/feedback but no egui work, and the renderer without editor projection/feedback. Keep the same physical scene rectangle across modes and verify execution with counters and exact compositor tests.
  • Organize optional instrumentation in src/measurement/, host adapters beside each host, and automation/reporting/tests in tools/benchmark/. Ordinary builds exclude the measurement feature and browser measurement page.
  • Add the bounded CC0 Chess Set fixture with pinned sources, reproducible GLB packing, attribution, and automated integrity checks. TESTING.md indexes the workflows, methodology, upstream suites, and fixture policy.
  • Add View → Developer → Show FPS Meter: a passive, click-through readout at the app window's bottom-right. It reports application submission cadence without adding a timer, repaint loop, or GPU wait.

Related to #2. This delivers the testing and measurement foundation; profiling attribution and optimization remain deferred in that issue. CPU API timings do not establish GPU completion, displayed FPS, or physical-input latency. Performance captures remain opt-in and run in isolated browser processes.

Validation

  • just verify: formatting, Clippy, tooling tests, native Rust tests, exact guide replay, measurement contracts, and scene-only compositor parity.
  • just web-verify and just benchmark-web-check: ordinary WASM build plus measurement-enabled WASM Clippy. The latter is also added to hosted CI.
  • just ci-docs check: 28 guide features and 136 exact Linux artifacts; updated native/Linux meter images reviewed.
  • Real native/browser captures cover all three execution modes. Final FPS placement was checked in isolated headed Chromium; ten additional meter-off/on stationary Chess runs recorded the same 8.3 ms median cadence. This is a bounded check, not a zero-overhead or speedup claim.

All four hosted CI lanes passed on the PR commit: Ubuntu checks, exact Linux guide replay, macOS bundle/native integration, and WASM builds including the optional measurement adapter.

@softmarshmallow
softmarshmallow merged commit 7a46229 into main Oct 2, 2026
8 checks passed
@softmarshmallow
softmarshmallow deleted the feature/performance-harness branch October 2, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant