`scripts/qmp/qmp.py` — host-side input helper, used by every probe that drives
a guest through QMP.
`drag()` returned nothing and the CLI printed `ok`, so the rate the guest
actually received was never on the record. It is not a diagnostic: an app that
pans by tracking the pointer redraws per motion event and cannot produce more
distinct views than it was sent, so that rate is a ceiling on any frame rate
measured across a drag. A caller reporting frames without it is quoting
whichever of the two is smaller and cannot say which.
`drag()` now returns `(moves, seconds)` for the held glide — the press, its
settle and the release stay outside the timed window — and the CLI prints
`moves=`, `secs=` and `moves_s=`.
The rule is not new here. `window-drag-probe.sh` already computes `posted_hz`
and warns "the counters below are bounded by the drag, not by this device", and
`drag.c`'s header says reporting the device as slow for an under-driven probe
"would be measuring this program". `maps-probe.sh` was written later, drives
through this helper, and sends its stdout to /dev/null.
Two facts the new output established immediately, both recorded in the
docstring because both had been assumed:
- The QMP round-trip is **0.7-0.9 ms** on x86/PCI macos-15 with the device
idle, so the default `hold_s=0.012` dominates and a drag achieves ~77
moves/s in-glide. A session had reasoned from an assumed ~20 ms round-trip to
the conclusion that a 28 fps app was bounded by this loop; the first arm
refuted it.
- The returned rate is **in-glide**, and a caller spawning one `qmp.py` per
circuit does not achieve it: ~0.14 s of process spawn between circuits took a
measured 77/s in-glide down to 54/s sustained, and 1490/s down to 151/s.
Verification: offline against a stubbed transport, `drag()` reports 24 timed
moves per 4-segment circuit and recovers an injected round-trip to within
0.6 ms across three (hold, rtt) pairs. Live on macos-15 x86/PCI, two banded
bare-desktop arms produced the numbers above. No Rust changed, so no clippy or
test arm is affected.
Not verified: the round-trip was measured with the device idle. Whether it
holds while the device is drawing is a separate arm, in flight.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>