From 3d08d81b0d99d4b6cdd0aa64e0c6d63dde0ffe8f Mon Sep 17 00:00:00 2001 From: VallierDev <24893073+VallierDev@users.noreply.github.com> Date: Fri, 16 Oct 2026 09:46:10 +0800 Subject: [PATCH] Log per-window frame counts in latest-frame stats sent/skipped are cumulative while max_* are per-window peaks, which was easy to misread (#16). Add window_s, window_sent and window_skipped. Co-Authored-By: Claude Opus 5.5 --- src/video.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/video.rs b/src/video.rs index 37682f9..2a72174 100644 --- a/src/video.rs +++ b/src/video.rs @@ -538,6 +538,8 @@ pub async fn stream_desktop(pc: Arc, track: Arc { @@ -598,7 +600,9 @@ pub async fn stream_desktop(pc: Arc, track: Arc= Duration::from_secs(30) { crate::capture::keep_display_awake()?; - log::info!("Desktop latest-frame stats: sent={} skipped={} latest_seq={} max_slot_age_ms={} max_send_ms={}", frames, skipped, frame.sequence, max_age_ms,max_send_ms); + log::info!("Desktop latest-frame stats: sent={} skipped={} latest_seq={} window_s={} window_sent={} window_skipped={} max_slot_age_ms={} max_send_ms={}", + frames, skipped, frame.sequence, stats.elapsed().as_secs(), frames - window_frames, skipped - window_skipped, max_age_ms, max_send_ms); + (window_frames, window_skipped) = (frames, skipped); stats = Instant::now(); max_age_ms = 0; max_send_ms = 0;