📊 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.