Files
saphid--frame-control/bench/results/2026-09-28-a3c6e5c-dirty-baseline.json
T
saphidandClaude Opus 5.5 9e4dcdd147 Mac in the headset: measure every frame, adapt to the network, separate windows
- Per-frame timing on the Mac's clock (capture, encode, network, decode,
  draw), viewer clock sync and reports, input echo, /stats and a HUD.
- scripts/macview-bench.py: repeatable runs on the real Frame, a shaping
  relay (no sudo), interleaved A/B between agent settings; results in
  bench/results/.
- Adaptive controller: ack-based send gate with jitter-aware slack, AIMD
  bitrate that knows when a stream is app-limited, fps then size tiers.
  On a 50->3->50 Mbit/s step, scroll p95 went from 4.7 s to 72 ms; no cost
  on a clean link.
- Separate mode: real AppKit event loop (HiDPI and NSScreen now work),
  cropped capture for fixed-size windows, windows kept on their display,
  graceful quit restores windows; stop/start races fixed.
- Encoder timeline clamp (no oversized frame after a pause).
- Frame Control shows each live stream's fps, delay, bitrate and tier.

Reviewed by GPT-6 Astra xhigh (read-only), 7 rounds; findings fixed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-28 20:56:14 +10:00

1124 lines
19 KiB
JSON

{
"label": "baseline",
"date": "2026-09-28T16:53:43",
"commit": "a3c6e5c+dirty",
"config": {
"quality": "balanced",
"mode": "separate",
"net": "none",
"delay_ms": 0,
"buffer_ms": 250,
"host": "frame",
"ssh_opts": [],
"encoder": "",
"duration_s": 20.0,
"browser_flags": []
},
"frame_build": "20260925.6191901",
"mac": "26.5.2",
"headset": ":51.824645 [Info] - 0 - entering standby",
"scenarios": [
{
"scenario": "test",
"frames_sent": 1248,
"frames_drawn": 1245,
"frames_shown": 809,
"duration_s": 20.8,
"stages_ms": {
"capture": {
"p50": 0.0,
"p95": 0.0,
"p99": 0.0,
"n": 1248
},
"queue": {
"p50": 0.0,
"p95": 0.1,
"p99": 0.1,
"n": 1248
},
"encode": {
"p50": 4.2,
"p95": 4.8,
"p99": 5.1,
"n": 1248
},
"socket": {
"p50": 0.1,
"p95": 0.2,
"p99": 0.2,
"n": 1248
},
"network": {
"p50": 4.2,
"p95": 6.9,
"p99": 13.9,
"n": 1248
},
"decode": {
"p50": 1.3,
"p95": 2.5,
"p99": 4.6,
"n": 1245
},
"draw": {
"p50": 0.4,
"p95": 0.6,
"p99": 1.0,
"n": 1245
},
"present": {
"p50": 6.9,
"p95": 15.4,
"p99": 19.5,
"n": 809
},
"content": {
"p50": 10.3,
"p95": 13.5,
"p99": 19.6,
"n": 1245
},
"content_shown": {
"p50": 17.4,
"p95": 25.6,
"p99": 30.7,
"n": 809
}
},
"fps": 60.0,
"fps_shown": 39.0,
"late_pct": 0.96,
"stall_max": 110.3,
"stalls_over_100ms": 1,
"mbps": 0.47,
"keyframes": 2,
"size": "1280x720",
"captured": 1588,
"viewer_never_drawn": 3,
"input_ms": {
"p50": 28.0,
"p95": 34.4,
"p99": 37.6,
"n": 40
},
"input_shown_ms": {
"p50": 35.1,
"p95": 49.5,
"p99": 50.5,
"n": 27
},
"input_parts_ms": {
"uplink": {
"p50": 11.5,
"p95": 19.7,
"p99": 22.1,
"n": 40
},
"mac": {
"p50": 4.7,
"p95": 12.3,
"p99": 16.1,
"n": 40
},
"back": {
"p50": 11.2,
"p95": 12.9,
"p99": 16.5,
"n": 40
}
},
"inputs": {
"sent": 40,
"seen": 40
},
"timeline": [
{
"t": 0,
"fps": 60,
"mbps": 0.49,
"content_p50": 10.2,
"content_p95": 13.0,
"bitrate": 5529600,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 1,
"fps": 60,
"mbps": 0.46,
"content_p50": 10.4,
"content_p95": 12.3,
"bitrate": 5529600,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 2,
"fps": 60,
"mbps": 0.46,
"content_p50": 10.5,
"content_p95": 12.0,
"bitrate": 5529600,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 3,
"fps": 60,
"mbps": 0.48,
"content_p50": 10.7,
"content_p95": 12.5,
"bitrate": 5529600,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 4,
"fps": 60,
"mbps": 0.47,
"content_p50": 10.6,
"content_p95": 13.3,
"bitrate": 5529600,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 5,
"fps": 60,
"mbps": 0.58,
"content_p50": 10.6,
"content_p95": 12.6,
"bitrate": 5529600,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 6,
"fps": 60,
"mbps": 0.45,
"content_p50": 10.8,
"content_p95": 13.3,
"bitrate": 5529600,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 7,
"fps": 60,
"mbps": 0.47,
"content_p50": 10.5,
"content_p95": 13.0,
"bitrate": 5529600,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 8,
"fps": 60,
"mbps": 0.47,
"content_p50": 10.5,
"content_p95": 12.9,
"bitrate": 5529600,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 9,
"fps": 60,
"mbps": 0.46,
"content_p50": 10.3,
"content_p95": 13.6,
"bitrate": 5529600,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 10,
"fps": 60,
"mbps": 0.46,
"content_p50": 10.8,
"content_p95": 14.3,
"bitrate": 5529600,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 11,
"fps": 58,
"mbps": 0.56,
"content_p50": 10.4,
"content_p95": 61.7,
"bitrate": 5529600,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 12,
"fps": 60,
"mbps": 0.45,
"content_p50": 10.8,
"content_p95": 12.7,
"bitrate": 5529600,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 13,
"fps": 60,
"mbps": 0.46,
"content_p50": 12.4,
"content_p95": 16.1,
"bitrate": 5529600,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 14,
"fps": 60,
"mbps": 0.46,
"content_p50": 9.8,
"content_p95": 12.2,
"bitrate": 5529600,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 15,
"fps": 60,
"mbps": 0.47,
"content_p50": 9.7,
"content_p95": 12.3,
"bitrate": 5529600,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 16,
"fps": 60,
"mbps": 0.45,
"content_p50": 9.7,
"content_p95": 12.5,
"bitrate": 5529600,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 17,
"fps": 60,
"mbps": 0.46,
"content_p50": 9.7,
"content_p95": 10.9,
"bitrate": 5529600,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 18,
"fps": 60,
"mbps": 0.46,
"content_p50": 9.7,
"content_p95": 11.4,
"bitrate": 5529600,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 19,
"fps": 60,
"mbps": 0.46,
"content_p50": 9.9,
"content_p95": 18.8,
"bitrate": 5529600,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 20,
"fps": 47,
"mbps": 0.36,
"content_p50": 9.9,
"content_p95": 11.8,
"bitrate": 5529600,
"tier": 0,
"w": 1280,
"net": null
}
],
"adapt": [],
"content_p50": 10.3,
"content_p95": 13.5,
"input_p50": 28.0,
"input_p95": 34.4,
"grades": {
"content_p50": "local",
"content_p95": "local",
"input_p50": "local",
"input_p95": "local",
"fps": "local",
"late_pct": "local",
"stall_max": "acceptable"
},
"cpu": {
"mac_agent_pct": 15.4,
"frame_viewer_pct": 51.1,
"frame_tailscaled_pct": 5.3,
"frame_sshd_pct": 0.8,
"frame_gamescope_pct": 5.7,
"frame_total_pct": 15.3
},
"viewer": "h264 software; ANGLE (Mesa, zink Vulkan 1.4(Turnip Adreno (TM) 750 (MESA_TURNIP)), OpenGL 4.6); raf 140 Hz",
"show_s": 1.87,
"panel": "valve.steam.desktopgame.2001639889",
"src": "test"
},
{
"scenario": "scroll",
"frames_sent": 690,
"frames_drawn": 683,
"frames_shown": 645,
"duration_s": 20.7,
"stages_ms": {
"capture": {
"p50": -1.2,
"p95": 16.9,
"p99": 24.5,
"n": 690
},
"queue": {
"p50": 0.0,
"p95": 0.0,
"p99": 0.1,
"n": 690
},
"encode": {
"p50": 4.1,
"p95": 7.0,
"p99": 13.2,
"n": 690
},
"socket": {
"p50": 0.1,
"p95": 0.2,
"p99": 0.3,
"n": 690
},
"network": {
"p50": 6.2,
"p95": 14.6,
"p99": 119.2,
"n": 690
},
"decode": {
"p50": 3.7,
"p95": 9.4,
"p99": 23.3,
"n": 683
},
"draw": {
"p50": 0.4,
"p95": 0.8,
"p99": 1.2,
"n": 683
},
"present": {
"p50": 0.8,
"p95": 18.6,
"p99": 23.6,
"n": 645
},
"content": {
"p50": 15.0,
"p95": 40.3,
"p99": 112.7,
"n": 683
},
"content_shown": {
"p50": 20.2,
"p95": 42.7,
"p99": 106.9,
"n": 645
}
},
"fps": 33.0,
"fps_shown": 31.1,
"late_pct": 42.82,
"stall_max": 492.6,
"stalls_over_100ms": 6,
"mbps": 3.11,
"keyframes": 3,
"size": "1280x860",
"captured": 905,
"viewer_never_drawn": 7,
"input_ms": {
"n": 0
},
"input_shown_ms": {
"n": 0
},
"input_parts_ms": {
"uplink": {
"n": 0
},
"mac": {
"n": 0
},
"back": {
"n": 0
}
},
"inputs": {
"sent": 0,
"seen": 0
},
"timeline": [
{
"t": 0,
"fps": 36,
"mbps": 3.42,
"content_p50": 17.7,
"content_p95": 34.3,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 1,
"fps": 35,
"mbps": 2.8,
"content_p50": 13.6,
"content_p95": 27.7,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 2,
"fps": 31,
"mbps": 2.15,
"content_p50": 12.1,
"content_p95": 34.1,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 3,
"fps": 37,
"mbps": 2.29,
"content_p50": 14.6,
"content_p95": 28.5,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 4,
"fps": 35,
"mbps": 2.11,
"content_p50": 16.1,
"content_p95": 29.3,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 5,
"fps": 33,
"mbps": 2.05,
"content_p50": 10.9,
"content_p95": 27.9,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 6,
"fps": 33,
"mbps": 5.71,
"content_p50": 17.1,
"content_p95": 41.7,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 7,
"fps": 31,
"mbps": 3.3,
"content_p50": 12.1,
"content_p95": 31.3,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 8,
"fps": 24,
"mbps": 4.37,
"content_p50": 26.6,
"content_p95": 236.8,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 9,
"fps": 36,
"mbps": 3.19,
"content_p50": 11.6,
"content_p95": 26.5,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 10,
"fps": 36,
"mbps": 3.53,
"content_p50": 15.2,
"content_p95": 29.6,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 11,
"fps": 29,
"mbps": 3.56,
"content_p50": 11.5,
"content_p95": 36.8,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 12,
"fps": 29,
"mbps": 1.99,
"content_p50": 13.2,
"content_p95": 41.2,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 13,
"fps": 31,
"mbps": 3.4,
"content_p50": 23.9,
"content_p95": 44.5,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 14,
"fps": 32,
"mbps": 2.85,
"content_p50": 14.3,
"content_p95": 37.6,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 15,
"fps": 31,
"mbps": 3.39,
"content_p50": 19.8,
"content_p95": 35.9,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 16,
"fps": 22,
"mbps": 2.74,
"content_p50": 22.5,
"content_p95": 112.7,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 17,
"fps": 44,
"mbps": 3.2,
"content_p50": 14.0,
"content_p95": 31.0,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 18,
"fps": 35,
"mbps": 4.12,
"content_p50": 16.8,
"content_p95": 32.9,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 19,
"fps": 36,
"mbps": 2.63,
"content_p50": 13.9,
"content_p95": 25.2,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 20,
"fps": 27,
"mbps": 1.71,
"content_p50": 17.2,
"content_p95": 40.3,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
}
],
"adapt": [],
"content_p50": 15.0,
"content_p95": 40.3,
"input_p50": null,
"input_p95": null,
"grades": {
"content_p50": "local",
"content_p95": "acceptable",
"fps": "bad",
"late_pct": "bad",
"stall_max": "bad"
},
"cpu": {
"mac_agent_pct": 5.1,
"frame_viewer_pct": 44.2,
"frame_tailscaled_pct": 4.8,
"frame_sshd_pct": 0.6,
"frame_gamescope_pct": 4.2,
"frame_total_pct": 13.7
},
"viewer": "h264 software; ANGLE (Mesa, zink Vulkan 1.4(Turnip Adreno (TM) 750 (MESA_TURNIP)), OpenGL 4.6); raf 139 Hz",
"show_s": 1.82,
"panel": "valve.steam.desktopgame.2001631563",
"src": "separate:6889"
},
{
"scenario": "type",
"frames_sent": 76,
"frames_drawn": 76,
"frames_shown": 76,
"duration_s": 20.2,
"stages_ms": {
"capture": {
"p50": 0.5,
"p95": 7.2,
"p99": 10.1,
"n": 76
},
"queue": {
"p50": 0.0,
"p95": 0.0,
"p99": 0.1,
"n": 76
},
"encode": {
"p50": 4.4,
"p95": 9.7,
"p99": 16.7,
"n": 76
},
"socket": {
"p50": 0.1,
"p95": 0.2,
"p99": 0.2,
"n": 76
},
"network": {
"p50": 5.2,
"p95": 43.2,
"p99": 263.5,
"n": 76
},
"decode": {
"p50": 2.1,
"p95": 4.8,
"p99": 13.4,
"n": 76
},
"draw": {
"p50": 0.7,
"p95": 1.0,
"p99": 1.1,
"n": 76
},
"present": {
"p50": 0.9,
"p95": 1.5,
"p99": 1.8,
"n": 76
},
"content": {
"p50": 12.9,
"p95": 54.2,
"p99": 264.6,
"n": 76
},
"content_shown": {
"p50": 14.1,
"p95": 55.3,
"p99": 265.9,
"n": 76
}
},
"fps": 3.8,
"fps_shown": 3.8,
"late_pct": 96.0,
"stall_max": 1327.9,
"stalls_over_100ms": 68,
"mbps": 0.02,
"keyframes": 2,
"size": "1280x860",
"captured": 125,
"viewer_never_drawn": 0,
"input_ms": {
"p50": 50.1,
"p95": 110.6,
"p99": 165.7,
"n": 65
},
"input_shown_ms": {
"p50": 50.8,
"p95": 111.5,
"p99": 166.2,
"n": 65
},
"input_parts_ms": {
"uplink": {
"p50": 7.6,
"p95": 18.3,
"p99": 23.2,
"n": 65
},
"mac": {
"p50": 30.6,
"p95": 72.4,
"p99": 119.2,
"n": 65
},
"back": {
"p50": 12.3,
"p95": 28.1,
"p99": 33.9,
"n": 65
}
},
"inputs": {
"sent": 66,
"seen": 65
},
"timeline": [
{
"t": 0,
"fps": 5,
"mbps": 0.01,
"content_p50": 12.3,
"content_p95": 28.1,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 1,
"fps": 4,
"mbps": 0.01,
"content_p50": 16.8,
"content_p95": 33.9,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 2,
"fps": 6,
"mbps": 0.01,
"content_p50": 9.0,
"content_p95": 22.2,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 3,
"fps": 5,
"mbps": 0.01,
"content_p50": 11.5,
"content_p95": 20.6,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 4,
"fps": 5,
"mbps": 0.01,
"content_p50": 9.2,
"content_p95": 13.1,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 5,
"fps": 5,
"mbps": 0.01,
"content_p50": 3.0,
"content_p95": 15.1,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 6,
"fps": 5,
"mbps": 0.14,
"content_p50": 14.0,
"content_p95": 21.1,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 7,
"fps": 5,
"mbps": 0.01,
"content_p50": 9.5,
"content_p95": 16.2,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 8,
"fps": 5,
"mbps": 0.01,
"content_p50": 13.8,
"content_p95": 16.2,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 9,
"fps": 5,
"mbps": 0.01,
"content_p50": 14.0,
"content_p95": 28.1,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 10,
"fps": 5,
"mbps": 0.01,
"content_p50": 12.8,
"content_p95": 31.7,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 11,
"fps": 6,
"mbps": 0.01,
"content_p50": 12.3,
"content_p95": 14.4,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 12,
"fps": 4,
"mbps": 0.01,
"content_p50": 15.2,
"content_p95": 17.2,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 13,
"fps": 1,
"mbps": 0.0,
"content_p50": 18.9,
"content_p95": 18.9,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 14,
"fps": 2,
"mbps": 0.0,
"content_p50": 203.5,
"content_p95": 215.0,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 15,
"fps": 1,
"mbps": 0.0,
"content_p50": 16.1,
"content_p95": 16.1,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 16,
"fps": 2,
"mbps": 0.16,
"content_p50": 15.5,
"content_p95": 35.1,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 17,
"fps": 1,
"mbps": 0.0,
"content_p50": 264.6,
"content_p95": 264.6,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 18,
"fps": 1,
"mbps": 0.0,
"content_p50": 12.9,
"content_p95": 12.9,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 19,
"fps": 2,
"mbps": 0.0,
"content_p50": 11.7,
"content_p95": 54.2,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
},
{
"t": 20,
"fps": 1,
"mbps": 0.0,
"content_p50": 339.6,
"content_p95": 339.6,
"bitrate": 6604800,
"tier": 0,
"w": 1280,
"net": null
}
],
"adapt": [],
"content_p50": 12.9,
"content_p95": 54.2,
"input_p50": 50.1,
"input_p95": 110.6,
"grades": {
"content_p50": "local",
"content_p95": "acceptable",
"input_p50": "acceptable",
"input_p95": "acceptable"
},
"cpu": {
"mac_agent_pct": 1.2,
"frame_viewer_pct": 6.5,
"frame_tailscaled_pct": 1.6,
"frame_sshd_pct": 0.3,
"frame_gamescope_pct": 2.4,
"frame_total_pct": 8.0
},
"viewer": "h264 software; ANGLE (Mesa, zink Vulkan 1.4(Turnip Adreno (TM) 750 (MESA_TURNIP)), OpenGL 4.6); raf 141 Hz",
"show_s": 1.43,
"panel": "valve.steam.desktopgame.2001427053",
"src": "separate:7011"
}
]
}