Repository navigation
Use monotonic microsecond timing and 2x ratio for CLI alias timing guard - #20163
Merged
Merged
Conversation
Contributor
[Low impact] The PR appears safe to merge, with no outstanding findings. SummaryUpdates the CLI timing guard to use monotonic microsecond measurements and require alias dispatch to take at most half as long as loading the full command table.
Reviews (2) · Last reviewed commit: "Use 2-space indentation in test/cli fast..." · Reviewed by Greptile |
Contributor
[Low impact] The PR affects one CLI performance check and its documentation. No behavioral defect was found, but the required two-space indentation must be applied before merging. Findings
SummaryUpdates the CLI timing guard to use monotonic microsecond measurements.
Reviews (1) · Last reviewed commit: "Use monotonic microsecond timing and 2x ..." · Reviewed by Greptile |
dhh
force-pushed
the
fix/cli-alias-timing-test
branch
from
November 25, 2026 16:20
c2cd4eb to
42d9f0d
Compare
cursor Bot
pushed a commit
to mark-groves/omarchy
that referenced
this pull request
Nov 25, 2026
…ard (omacom#20163) * Use monotonic microsecond timing and 2x ratio for CLI alias timing guard * Use 2-space indentation in test/cli fastest_us Python block
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
Follow-up to #20132, which sped up full command-table loading in
bin/omarchy~5.5x (from ~260ms down to ~47ms).With full-table loading now ~47ms vs ~11ms for alias dispatch (~4x true ratio), the existing guard in
test/cli(alias_ms * 4 > full_mstimed via/proc/uptime's 10ms ticks) had almost zero margin and flaked on loaded CI runners whenever a ~12ms alias run quantized up to 20ms (20 * 4 > 50)./proc/uptime10ms quantization intest/cli(fastest_us) with Python'stime.monotonic_ns()(5 runs, taking the fastest, withcheck=True), preserving immunity to NTP/timesyncd wall-clock steps in freshly booted CI VMs while eliminating 10ms rounding jitter.alias_ms * 4 > full_mstoalias_us * 2 > full_us(alias dispatch must cost under half of full-table load), which still catches a regression back to full-table loading (~47ms vs ~47ms -> ~1x) immediately while staying flake-free on CI.docs/testing.mdto match the new threshold and current timings.Verification
./test/clipassed 6/6 consecutive runs (10.7–12.4msvs43.8–46.8ms).codex review --base origin/quattroapproved with zero actionable regressions.