ci: measure the text-input refresh cost on demand - #223
Merged
Conversation
#219 added an in-process sampler for the refresh call after each printable keystroke, but nothing ran it -- settling #183's remaining half still needed someone to build a tagged app locally and drive it by hand. The tests-build-and-lag job already builds the app, spins a virtual display, launches it tagged and waits on the socket. That is everything the sampler harness needs, so this adds a dispatch-only step that reuses it. Its own app instance, deliberately: the sampler only records when PROGRAMA_TYPING_TIMING_LOGS=1, and enabling that for the lag harness above would add logging to the very path that harness measures. Reports numbers into the run summary and asserts no budget. There is no baseline yet, and a threshold invented before any data would be a number from nowhere. With this, #183's remaining half becomes decidable without a local run: dispatch on main, dispatch on perf/183-redraw-after-input, compare p95 at microsecond resolution rather than through a socket round trip that cannot resolve it. Refs #183
This was referenced Jul 31, 2026
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.
Refs #183. Makes the remaining half of that issue decidable without a local run.
What this does
#219 added
ProgramaDurationSamplesandtests/test_text_input_refresh_cost.py, but nothing ran them — settling #183 still required someone to build a tagged app locally and drive it by hand.tests-build-and-lagalready builds the app, spins a virtual display, launches it tagged and waits on the socket. That's everything the sampler harness needs, so this adds a dispatch-only step reusing it.Why in-process rather than the existing harness
The lag harness measures a socket RPC round trip — IPC, JSON,
DispatchQueue.main.sync, AppKit dispatch, then the work. That transport is order-milliseconds; the work in question is plausibly microseconds. Four runs of theforceRefreshchange (two before, two after) produced completely overlapping ranges, and more samples cannot fix that: the noise floor is set by the transport, not the sample count.This times the refresh call itself.
Its own app instance
Deliberate. The sampler only records when
PROGRAMA_TYPING_TIMING_LOGS=1, and enabling that for the lag harness above would add logging to the very path that harness measures. Separate launch, separate tag, separate socket.No budget
Reports numbers into the run summary and asserts nothing. There is no baseline yet, and a threshold invented before any data would be a number from nowhere. Dispatch-only, so it costs nothing on ordinary pushes.
How this settles #183
Compare p95 from the two run summaries. That branch then merges or closes on evidence — either is a real answer, where today it's "unresolvable with current tooling."
Test plan
github.event_name == 'workflow_dispatch'bash -non the step body