fix(bench): use force_push instead of push in video_queue bench_push
Production code (io_loop.rs:1310) always uses force_push which drops the oldest frame when the queue is full. The benchmark was using push() which silently fails on a full queue. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
3427d2f34f
commit
98acd06c7f
1 changed files with 2 additions and 1 deletions
|
|
@ -45,7 +45,8 @@ fn bench_push(c: &mut Criterion) {
|
|||
let q = ArrayQueue::new(QUEUE_CAP);
|
||||
b.iter(|| {
|
||||
for f in &frames {
|
||||
let _ = q.push(black_box(f.clone()));
|
||||
// Real code uses force_push (io_loop.rs:1310)
|
||||
q.force_push(black_box(f.clone()));
|
||||
}
|
||||
// Drain for next iteration
|
||||
while q.pop().is_some() {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue