2.1 KiB
Performance and realtime qualification
make test-performance runs a hardware-independent 48 kHz, 128-frame stereo
workload: 64 graph nodes, 4096 MIDI notes (32 simultaneous), 16 tracks and gain
automation. Preparation and block timing use CLOCK_MONOTONIC outside the engine;
callback code itself does not clock or log. The test checks finite output and
reports mean, p99, maximum and CPU-time/audio-duration ratio. A run is a workload
measurement, not a universal realtime threshold. Run more blocks with:
./build/test_performance 10000
Initial Phase 9 measurement on an AMD Ryzen Threadripper 1920X, GCC 16.2.1, -O2, 2000 blocks: preparation 3.045 ms, mean 308.301 us, p99 422.153 us, maximum 665.096 us, versus a 2666.667 us block deadline; CPU/audio ratio 0.1156. These are one host/run's observed values and depend on scheduling/load/compiler. The test excludes WAV disk preparation, external/native plugin complexity, GUI redraw, server scheduling and actual hardware latency. Native callbacks must provide their own bounded realtime implementation.
Existing software JACK loopback, stereo MIDI/save/reopen, record/reopen, restart/close and concurrent graph handoff tests remain available. Runtime fault injection covers loss/rate/xrun/null-buffer and lifecycle failures without altering the shared server. ASan/UBSan validate memory/error paths; TSan checks recorder/handoff races, not timing. Sanitized runs are not latency qualification.
Current worst-case storage includes up to 256 MiB preloaded mono WAV samples, paired graph buffers (128 MiB at 256 nodes/65536 frames; GUI limit 32 MiB), bounded MIDI/mix metadata and up to 33 metadata/graph history snapshots. Pending/retired plans can retain additional graph memory. Native preparation can allocate more; the API cannot enforce an extension's memory budget. There is no CPU overload scheduler, disk streaming, latency compensation or callback allocator audit of arbitrary third-party code. High-density interactive projects, physical devices, long-duration stereo/recording and live server termination remain unqualified.