Commits
2026-08-13
Merge branch 'worktree-agent-a1dbd9ef7cdaec697'Ahmet Kaan Gümüş · 1cb74a4
Merge branch 'worktree-agent-a1dbd9ef7cdaec697' # Conflicts: # scripts/bench.sh
🔧 chore(bench): an export measurement may carry the sound it is judged byAhmet Kaan Gümüş · 56e406a
🔧 chore(bench): an export measurement may carry the sound it is judged by The export metric covered picture only, and a floor phrased as "twice real time end to end" cannot be read off it: the audio pass is inside that wall clock. BENCH_EXPORT_AUDIO puts the same clip on an audio lane and names the row `_av`, so the two numbers can never be mistaken for each other; BENCH_EXPORT_ASTREAM picks which of the file's tracks it is, a film's second one being the one no sample table can copy (this film's AC-3 5.1 re-encodes at 43x real time, its AAC stereo copies) and therefore the one that measures the re-encode; BENCH_EXPORT_SPAN sets how much timeline a measurement covers, since sixty seconds of a two-hour film says nothing about the pass that runs once per export. And scripts/bench.sh built the plugin it depends on with a target filter that excluded it: `--example bench` selects no target in engine-hw, so a fresh target directory produced no libengine_hw.so and every "hardware" row was software with nothing on it saying so -- the exact silent fallback the LD_LIBRARY_PATH comment three lines below it warns about (11.55 fps against 94.58 for the same span, measured 2026-08-13). Two builds now, and the script refuses to run at all if the plugin is not where the loader will look.
✨ feat(bench): a seek storm and a play loop, and the underruns they costAhmet Kaan Gümüş · 8271b5d
✨ feat(bench): a seek storm and a play loop, and the underruns they cost The complaint is a long film jumped around in: the sound runs dry and the picture jumps. Neither was measurable. The audio plugin counted its starved callbacks and only whispered them on the way out, so a session could be asked nothing while it ran; `ao_underruns` reads the same counter -- two relaxed atomic loads, nothing added to the RT path but one store on the starved branch -- and `PlaybackSession::audio_underruns` hands it over in device seconds. The picture's half is `restarts`, counted where a worker is replaced, so a seek, a clip boundary and a late-picture resync all land in one number. Two metrics use them. `seekstorm` plays the file and seeks fifty seeded random places, cold then warm, and reports first-frame p50/p95/max beside the underruns each pass cost -- playing, because a paused device runs no callbacks and can never starve. `playloop` runs the app's own pump for N seconds with a jump every five, and reports the gap between frames (p50/p99), the underruns and the restarts, with its own count of late-picture resyncs beside them. Both name the decode backend in the note, as seek and scrub already do: a row that does not say `backend HW` was measured in software. And it would have been. `cargo build -p engine-hw --example bench` selects example targets in every package it is given, and a cdylib is not one, so the line that exists to build the plugin built nothing and the LD_LIBRARY_PATH below it pointed at an empty directory. The plugins are their own build now.
🔧 chore(bench): a seat for hardware HEVC, and a run that may keep its fileAhmet Kaan Gümüş · 57f6721
🔧 chore(bench): a seat for hardware HEVC, and a run that may keep its file `bench export <file> hevchw` measures the GPU seat; plain `hevc` still means the software one so a row keeps comparing with the baselines already recorded against it, and `scripts/bench.sh` sweeps both. `BENCH_KEEP=1` leaves the exported file where a run would have deleted it, which is how a seat is checked for decodability -- `ffprobe -count_frames` on what it actually wrote -- rather than for speed.
2026-08-12
📊 feat(bench): the decode/encode baseline, measured on real 4K filmsAhmet Kaan Gümüş · cb2833f
📊 feat(bench): the decode/encode baseline, measured on real 4K films
Nothing in this tree said how long an open, a seek, a scrub or an export
actually take on the files this editor is used on -- 5 to 30 GB HDR mkvs,
where a fixture's five seconds says nothing. Every later codec change is
supposed to be an improvement over *something*, and this is that something.
`examples/bench` measures one metric per process, on purpose: a decoder
that panics on its own thread must cost one row and not the run. It
reports medians of five with the min and max beside them, because on a
file this size the spread is the finding as often as the middle is.
* `open` -- `Demuxer::open`, cold and warm. Cold is the file's pages
dropped with posix_fadvise(DONTNEED) on a fd of our own:
no root, no drop_caches, nothing else evicted, and
advisory -- so a cold number is the optimistic end of
cold, and the header says so.
* `seek` -- first-frame latency at t=30/600/5400 s down the deferred
opener, which is what every seek and clip boundary uses.
* `scrub` -- twenty steps waited for one by one, then twenty with no
wait at all: the first is latency, the second is what a
drag storm does to the thread count, which is the number
the abandoned-worker problem is actually about.
* `export` -- throughput over a fixed 60 s span, one encoder seat per
run, video only so a sound track that refuses cannot take
the picture's measurement with it. A run that outlasts its
cap is cancelled and still reports a rate, marked CAPPED,
rather than reporting nothing.
`scripts/bench.sh` drives the list and writes the TSV. Its one trap is
worth the line it costs: the plugin is looked for beside the running
executable and an example binary lives a directory below it, so without
LD_LIBRARY_PATH every seat silently reads "SW" -- measured on the small
control file as 23 ms versus 1359 ms for the same seek. The file list is
read from $BENCH_LIST outside the repo: what is measured is a personal
library, and its names are not this project's to record.