Repository navigation
Conversation
…o-paste The real coordinator and processors, with stand-ins of fixed latency for the engine, microphone, paste and polish; what is left of the total is the coordinator's hand-over and its hops between stages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 16, 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.
Part of #73, point 5.
The CLI benchmarks time the engine and the processors; until now the coordinator's own share of release-to-paste (the feed hand-over,
endRecording, the hops between stages on the main actor) showed up only in the app's log line. This adds a harness that gives it a number of its own, and that PRs E and F (the coordinator splits) use for their before/after.What
swift run -c release pladder-cli bench-coordinator [--runs N] [--hold S] [--engine-latency MS] [--paste-latency MS] [--polish] [--live]Sources/PladderCLI/BenchCoordinator.swift, self-contained likeBenchProcess.swift: it needs only its line inmain.swift's dispatch, so it can be copied onto an older commit for a before/after.DictationCoordinatorwithStandardProcessors.pipeline(for:)on a fresh install'sDictationSettings, and private stand-ins for the rest:FixedLatencyEngine: aStreamingTranscriptionEngineonUtteranceSlot<Void>.endUtterance,warmPass,livePassandtranscribeeach take the latency and ignore cancellation, as a CoreML pass does.SilentCapture: silence at the real rate. A drain or a stop returns what a microphone would have captured since the last one.TimedOutput,FixedLatencyRefiner(300 ms, with--polish), and a hotkey monitor that does nothing.Each run presses, holds, releases and waits for
inFlight, stamping.recordingStoppedand.insertedinonEvent:total = inserted − stoppedshare = total − (stop + engine + process + polish + paste), with the stages taken from theinsertedeventengine excess = timing.engine − engine latencyThe output is one line per run, then a table with
printBenchHeader's machine line and the load average at start and end.The stand-ins sleep on a strict
DispatchSourcetimer.Task.sleepovershot a 150 ms sleep by about 8 ms on the M1 even with zero tolerance, which would have swamped the engine-excess column. The strict timer overshoots by about 0.1 to 0.2 ms; the header prints the measured overshoot.Docs:
docs/BENCHMARKS.md: a new "### The coordinator's share" under "Procedure" with the first numbers, and a draft paragraph beside the compiled-model-cache note aboutANECCompile() FAILED (11)from Architecture review: every bug fixed with a regression test, polish and clipboard robustness, and the structural work #70's benchmarking. That paragraph's numbers are left to the developer.TimedOutputalso has a no-opcopy(_:). #76 makesTextOutput.copya requirement, and this keeps whichever of the two lands second building.First numbers
Apple M1, 16 GB, macOS 27.0, 21 runs each, load average about 2 (the other PRs' builds had just finished):
--polish--liveSpread check,
--runs 51twice: medians of 156 / 153 ms total, 0.05 / 0.02 ms share, 0.17 / 0.15 ms engine excess. The few milliseconds of total above 150 ms are the processors (2 to 3 ms, the language recogniser).No app code changes, so the critical-path rule does not apply here.
For the developer
ANECCompile() FAILED (11)paragraph indocs/BENCHMARKS.md"Baseline" with real numbers once the paced baseline is re-run on a quiet day.🤖 Generated with Claude Code