From 98acd06c7f332dd10973e398ef1143d647da783c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mence=20Lesn=C3=A9?= Date: Wed, 8 Apr 2026 19:46:37 +0200 Subject: [PATCH] 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) --- libs/scrap/benches/video_queue.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/scrap/benches/video_queue.rs b/libs/scrap/benches/video_queue.rs index e7a6a1d53..2367df53c 100644 --- a/libs/scrap/benches/video_queue.rs +++ b/libs/scrap/benches/video_queue.rs @@ -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() {}