gpui: Add frame snapshot oracle and render benchmarks - #62585
Draft
mikayla-maki wants to merge 1 commit into
Draft
gpui: Add frame snapshot oracle and render benchmarks#62585mikayla-maki wants to merge 1 commit into
mikayla-maki wants to merge 1 commit into
Conversation
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.
Summary
FrameSnapshotcovering scene primitives, hit testing, dispatch/focus state, cursor and tab requests, deferred draws, and accessibility updatesCanonicalization
Oracle windows share the test context's text system and sprite atlas. Scene order remains semantic, and primitive floating-point fields are compared by their IEEE-754 bit representation.
The oracle work also moved ordinary animation timing onto the GPUI executor clock so deterministic tests do not leak wall-clock time.
Validation
cargo check -p gpui --features test-supportcargo check -p benchmarks --bench gpui_frame_production./script/clippy -p gpui --features test-supportcargo fmt --allgit diff --checkFull Criterion sampling and the <5% machine-local variance check remain to be run on the target benchmark machine.
Suggested .rules additions
For GPUI code whose behavior depends on elapsed time, use the context executor's clock (
cx.background_executor().now()) instead ofscheduler::Instant::now()orInstant::elapsed(). The executor clock follows the deterministic test clock while production executors still use real time.Release Notes: