Skip to content

Speed up the update-lock test from 7s to 4s - #15419

Merged
dhh merged 1 commit into
quattrofrom
perf/update-lock-test-speed
Oct 14, 2026
Merged

dhh merged 1 commit into
quattrofrom
perf/update-lock-test-speed

Conversation

@dhh

@dhh dhh commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Per-file speedup from section 4 of the overnight quality plan. update-lock-test.sh: 6.8s → 3.7s, test-only, no coverage change.

Two stub update steps slept 2s (snapshot) and 3s (keyring) purely to still be running while the test poked at the held lock and the sleep inhibitor's file descriptors — and the test then waits for the whole update, paying both sleeps in full. They only need to outlast a 0.05s marker poll and a quick /proc/pid/fd scan; 0.8s and 1s keep a wide margin over both.

Verified: three consecutive runs pass at 3.7s. Codex review found no regressions (its sandbox could not run the test due to a read-only /run/user, failing identically on base — the local runs are the runtime evidence).

Two stub update steps slept 2s and 3s only to still be running
while the test poked at the lock and the inhibitor's descriptors;
the test waits for the whole update afterwards, so those sleeps
were paid in full. They only need to outlast a marker poll and an
fd scan: 0.8s and 1s keep a wide margin over both.
@dhh
dhh merged commit fe9ef72 into quattro Oct 14, 2026
@dhh
dhh deleted the perf/update-lock-test-speed branch October 14, 2026 06:02
@emirb emirb added this to the 4.5 milestone Oct 17, 2026
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.

2 participants