Skip to content

Software path reports its own network telemetry (#306) - #320

Merged
superuser404notfound merged 1 commit into
mainfrom
feat/issue-306-software-telemetry
Aug 7, 2026
Merged

superuser404notfound merged 1 commit into
mainfrom
feat/issue-306-software-telemetry

Conversation

@superuser404notfound

Copy link
Copy Markdown
Owner

Closes the telemetry gap reported in #306: on a software session the Network section of a host's stats overlay had nothing truthful to put in it.

Two defects, one symptom

The byte counter was native-only. AetherEngine.demuxerBytesFetched read through nativeVideoSession, which a software session does not own, so it returned 0 for the entire session. Everything derived from it (instant bitrate, average bitrate, networkThroughputMbps, networkTransferredBytes, LiveTelemetry.demuxerBytesFetched) was therefore a hard zero on the one path that carries VP9, AV1 without hardware decode and MPEG-4 Part 2. It now reads the pump with the precedence the memprobe has always used, software first, native second.

The read-ahead was computed for the log only. The cushion from #303 and the reader's sliding window existed but never reached the public snapshot.

What is published now

field path meaning
displayCushionSeconds software decoded video queued past the clock (#303)
readerWindowAheadBytes both fetched but not yet consumed by the demuxer, the runway that actually exists
accumulatedFrameDelaySeconds software cumulative late-frame delay from the render synchronizer
droppedFrameCount now both was nil on software; comes from videoPerformanceMetrics

forwardBufferSeconds deliberately stays nil on software. The demux loop reads on renderer back-pressure, so there is no seconds-deep reservoir of arrived-but-unplayed media on that path, and publishing the sub-second cushion under the native path's name would report a near-stall on a healthy session. That is the same reasoning the reporter used to leave the rows blank rather than publish bufferedPosition, and it is what the extra fields exist for.

Verification

aetherctl play now appends the network half of the snapshot to its 1 Hz line. Real VP9 session, rate-limited logging origin (30 ms latency, 8 Mbps):

t=02 ... net=3.28Mbps rx=1.2MB  ahead=0.6MB cushion=0.48s drop=9
t=08 ... net=5.73Mbps rx=5.9MB  ahead=4.1MB cushion=0.23s drop=99
t=14 ... net=6.63Mbps rx=10.7MB ahead=7.6MB cushion=0.29s drop=190

Every one of those read zero or nothing before. The native arm of the same harness is unchanged: fwd present, cushion / delay nil, ahead now populated from the pump reader. The climbing drop count is a headless-CLI artifact, nothing binds a render surface there.

Unit coverage in Issue306SoftwareTelemetryTests: counter precedence, the software fields reaching the snapshot, nil rather than zero when the metrics cannot be asked for, the teardown seam during the async metrics read, and the native path leaving the software fields nil. Full suite green (1531 tests).

The byte counter every byte-shaped figure derives from was read through
`nativeVideoSession`, which a software session does not own, so bitrate,
throughput and transferred bytes were a hard zero for the whole session
rather than the real numbers. It now reads the pump the memprobe has
always read, software first, native second.

Publishes what the path already computes for the 30 s memprobe: the
decoded cushion (#303) as `displayCushionSeconds`, the reader's undrained
forward extent as `readerWindowAheadBytes` (both paths), and the render
synchronizer's dropped / late frames, which fills `droppedFrameCount` on
a path that used to leave it nil.

`forwardBufferSeconds` stays nil on the software path on purpose. The
demux loop reads on renderer back-pressure, so there is no seconds-deep
reservoir of arrived-but-unplayed media there, and publishing the
sub-second cushion under that name would report a near-stall on a session
that is playing perfectly.

`aetherctl play` appends the same fields to its 1 Hz line, which is how
this was verified against a real VP9 session over a rate-limited origin:
rx 0.4 -> 10.7 MB, net 3.3 -> 6.6 Mbps, ahead to 7.6 MB, cushion 0.19 to
0.48 s, where every one of those read zero or nothing before.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01HX5zV3Fcf7Nzq4DYGdXvQE
@superuser404notfound
superuser404notfound merged commit 6b50057 into main Aug 7, 2026
3 checks passed
@superuser404notfound
superuser404notfound deleted the feat/issue-306-software-telemetry branch August 7, 2026 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant