Skip to content

ci: measure the text-input refresh cost on demand - #223

Merged
arzafran merged 1 commit into
mainfrom
ci/183-measure-refresh-cost
Jul 30, 2026
Merged

ci: measure the text-input refresh cost on demand#223
arzafran merged 1 commit into
mainfrom
ci/183-measure-refresh-cost

Conversation

@arzafran

Copy link
Copy Markdown
Member

Refs #183. Makes the remaining half of that issue decidable without a local run.

What this does

#219 added ProgramaDurationSamples and tests/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-lag already 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 the forceRefresh change (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

gh workflow run ci.yml --ref main
gh workflow run ci.yml --ref perf/183-redraw-after-input

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

  • YAML parses; step present and gated on github.event_name == 'workflow_dispatch'
  • bash -n on the step body
  • CI green (this step won't run on the PR — it's dispatch-only, by design)
  • After merge: dispatch on both refs and compare

#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
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