Repository navigation
benchmarks: Record full-app recording runs and report the 5% gate (Refs #1305) - #1410
Merged
Merged
Conversation
…mapped libobs (Refs obs-rust#1305) RED: the check is a stub, 19/19 tests fail. The tests reject llvmpipe, softpipe and WARP renderers, the wrong libobs backend, two or zero libobs, a missing graphics module, a graphics module from outside the install prefix and a deleted mapping, and accept the hardware setup. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…run (Refs obs-rust#1305) GREEN: 19/19. recording_evidence_check.py reads the OBS log and a copy of /proc/<pid>/maps (or vmmap/lsof output on macOS). It fails when the log shows a software renderer (llvmpipe, softpipe, swrast, lavapipe, WARP, Apple Software Renderer) or more than one renderer, when the mapped libobs is not the expected backend (Rust twin told apart by its /rustc/ paths, as in release-rust.yaml since obs-rust#1253), when not exactly one libobs and one graphics module are mapped, when a mapping was deleted, or when a library comes from outside --prefix (a stock libobs-opengl from the system lib dir next to our libobs). On success it prints the run identity (renderer, paths, SHA-256) as JSON for the evidence report. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…(Refs obs-rust#1305) RED: recording.py is a stub, 17/17 tests fail. The tests cover per-run metrics from GetStats/GetOutputStatus samples (frame counts, render and encoder skip rates, median frame render time and CPU; a counter that goes back, too few samples, no frames or an inactive recorder fail), the C/Rust report (medians and ranges per backend, Rust/C ratio, the 5% frame-time and dropped-frame gates, at least 5 runs per backend, refusal of mixed conditions, renderers, encoders or two builds of one backend), its Markdown table and the encoder evidence from the OBS log. Co-Authored-By: Claude Opus 5.5 <[email protected]>
obs-rust#1305) GREEN: 18/18 (+19/19 for the evidence check). `recording.py run` records from a running OBS after ci/recording_evidence_check.py passes: it starts the recording, waits for warm-up, samples GetStats every second, reads the recording output's counters at the start and the end, stops, checks that the expected encoder logged its settings for this recording and writes one JSON file (host, identity, video/profile/scene/source conditions, encoder log lines, file, metrics, raw samples). It can delete the file afterwards, also when a check fails. `recording.py report` compares at least 5 runs per backend with the same conditions and gives medians, ranges, the Rust/C ratio and the frame-time and dropped-frame gates; exit 2 when the gate fails. OBS logs the encoder settings before the "Recording Start" marker and the frame summary after it; the encoder check reads both. Smoke run on Debian 13 / RTX 3060 / fork 9f573a9, Rust libobs, NVENC H.264, 4K25 with an NDI output active: 30 s, 750 frames, 0 render / encoder skips, 3.16 ms median frame render time. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
ci/ tests import only the standard library and ci/ modules (test_ci_tests_stdlib_only.py, obs-rust#1196). recording.py needs websockets only for a live run, so loading it by path keeps the test on a plain Python. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked: on #1405 (the first two commits). Review only the last four commits; I rebase this PR after #1405 merges.
Refs #1305
What and why
#1305 needs C/Rust full-app recording evidence for the 5% gate in
docs/rust-port/release-criteria.md: independent interleaved runs, medians and ranges, hardware rendering, no profiler. This PR adds the runner and the report. The results on release hardware follow as a comment on #1305.rust/tools/benchmarks/recording.py:run: records once from an OBS that is already running with the scene and profile under test.ci/recording_evidence_check.py(ci: Check the renderer and the mapped libobs of a recording evidence run (Refs #1305) #1405) on the log and the mapped libraries. A software renderer, the other backend or a library from outside--prefixstops the run before it measures.--warmupseconds, samplesGetStatsevery second for--seconds, and reads the recording output'sGetOutputStatusat the start and the end.--encoder, e.g.obs-nvenc) logged its settings for this recording. OBS logs them before the==== Recording Startmarker, and the frame summary after it.--delete-recordingremoves the file, also when a check fails.report: compares the run files. It refuses fewer than 5 runs per backend, different conditions, renderers or graphics modules, and two builds of one backend. It gives median and range per backend and the Rust/C ratio for frame render time (median, p95), CPU and the render, output and encoder skip rates. Gate: Rust frame time median at most 1.05 x C; no skip rate above 1.05 x C; when C has no skips, Rust must have none. Exit code 2 when the gate fails.The script does not switch the backend. Switching needs an OBS restart with another library path, and that is host-specific.
docs/rust-port/release-criteria.mddescribes the procedure.GetStatscounts the frames of all video outputs (an NDI output next to the recording doublesoutputTotalFrames), so the encoder skip rate comes from the recording output's own counters.RED → GREEN
recording.pyis a stub; 17/17 tests inci/test_recording_benchmark.pyfail.recording.pyby path (test_ci_tests_stdlib_only.py, ci: the local gate's lint lane fails without a system PyYAML (test_ccache_launcher_installed.py) #1196). Fullci/suite on macOS: no new failures (the 8 failures before this change are Linux-only tests and stay the same).Recording Start, but OBS logs the encoder settings before it. Fixed in RED/GREEN before this PR.obs-nvencH.264 found, file deleted.Checklist
master(or the description starts with a Stacked: note)docs/features.mdis added or updated (not applicable: no user-visible change)-W..., ratchets): not applicable🤖 Generated with Claude Code