Repository navigation
Add the screen sharing bench observer, clock probes, samplers and calibrations (851-3592) - #893
Merged
pondorasti merged 1 commit intoOct 29, 2026
Conversation
…ibrations (851-3592) The black-box instrument for screen sharing v2. In ScreenSharingBench: clock probes over UDP with kernel receive timestamps, a windowed clock track (the minis' relative rate wanders with load), process CPU/energy and interface byte samplers, and the observer's frame decoding, JSONL log, first-seen versions, C1 agreement and input pairing. In CodevisorBench: observe, calibrate (c1, c2, c6, on-glass) and sample, plus a workflow_dispatch calibration workflow for the minis. Part of 851-3592 Co-Authored-By: Claude Opus 5.5 <[email protected]>
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 851-3592
The black-box instrument for screen sharing v2 (benchmark design §2, §4, §5): the SCK observer, UDP clock probes, CPU/energy and bitrate samplers, and calibrations C1, C2 and C6 as
calibratechecks. A follow-up PR will bring the acceptance numbers from the lab minis, which are waiting on the Screen Recording, Accessibility and Local Network grants.Library (
ScreenSharingBench)BenchClockProbeResponder/BenchClockProbeClientsend 40-byte probes over UDP. Receive times are kernel timestamps (SO_TIMESTAMP_MONOTONIC).BenchClockTrack: a ±30 s windowed fit with a leave-one-out residual. Over 10 minutes under CI load, a single line missed the minis' clock offset by up to 0.87 ms; the windowed fit stays within about 0.10 ms. ε measured mini↔mini is 0.341 ms.BenchMachClockreads continuous time, andBenchClockOffsetReadgives an exact, signed continuous − absolute offset. Everything the instrument writes is mach continuous ns. SCK's PTS is mach absolute (it equalsdisplayTimeto the ns).BenchProcessUsage/BenchProcessLoadreadproc_pid_rusageV6 (CPU ticks converted to ns, plus energy).BenchInterfaceCounters/BenchInterfaceRateread 64-bit counters viaNET_RT_IFLIST2.BenchProcessesfinds processes by name.BenchCapturedFrameturns SCK frames into observations.BenchObserverLogis the JSONL: a header that names its clock, then(version, pts_ns, callback_ns)per frame, with unreadable frames kept. AlsoBenchObservedVersions,BenchObserverAgreement(C1) andBenchInputResponses(C6/I2P).App (
CodevisorBench)observe: by default an SCK stream of only the barcode strip, which reports the observer's own CPU and power.calibrate --check c1 | c2 (--serve / --responder) | c6 | on-glass. On-glass drives the realScreenSharingMetalViewand 851-3583 frame timeline with barcode frames, and reports on-glass, display-link estimate andpresentedTimeminus observer PTS.sample: per-second process CPU and power, and interface Mbit/s.scripts/run-installed.sh(whichrun.shnow uses), plus the steps for theworkflow_dispatchworkflow.github/workflows/screen-sharing-bench-calibration.yml(tamale and croissant jobs, concurrency groupscreen-sharing-bench).NSLocalNetworkUsageDescriptionin Info.plist. Without Local Network, UDP to the other mini fails withEHOSTUNREACH.PlayerCPUClockis replaced by the sharedproc_pid_rusagemeter.Verification
swift testforScreenSharingBenchTestsandCodevisorBenchTests: 49 + 4 pass. The pre-commitbun run checkpassed: Swift format, lint and tests, and the iOS build.presentedTime− SCK PTS = +7.83 ms (constant), anddisplayLinkTarget− SCK PTS of −0.49 ms p50 and +7.85 ms p95.displayTime: 0 ns over 173 frames.highran twice. The valid findings are fixed: workflow gating and idle exit, transient socket errors, ambiguous input events, draining records after the settle, the per-observer clock offset, and exit 1 on a failed calibration.🤖 Generated with Claude Code