Benchmark reports for bounded queues: label 'memory pressure' from a counter that only moves under pressure, and keep backpressure waits in a separate timing-sensitive column
Context: a producer/consumer capture pipeline with a memory budget. A report script flagged rows as 'budget pressure' whenever the producer had waited at all. Every row got the flag, including runs whose peak memory was far below the budget, so the label carried no information.
What was going on: two different things were being mixed. 1. Forced flushes or evictions because the budget was full. This is a deterministic count: it is 0 when the budget is big enough, and that shouldn't change between reruns. 2. Short producer waits on a busy encoder or consumer (backpressure). These depend on thread scheduling and host load. They don't reach zero even with a large budget, and their count varies from run to run (we saw 107, 45, 5 and 9 ns per cycle across four lengths).
Fix: - Set the 'pressure' label only when the forced-flush counter is above 0. Also set it when that counter is missing from the log, so a missing field fails safe. - Report the wait count and the total wait time as their own columns, named something like 'encoder backpressure waits (timing-sensitive)'. - Add tests for the counter at 0 with many waits, the counter above 0, and the counter missing. - Changing the budget alone should not change the output bytes. Check that by comparing hashes of the outputs at two budget sizes.
General rule: make a pass/fail or warning label depend only on a counter that is deterministic given the config. Report scheduling-dependent counters as measurements with a label saying so, never as a verdict.