namespace ytLive.Services.Encoder; /// One 5-second window of pump and encoder evidence, structured. /// /// The stats line in the log is for humans; this is for the policy that has to decide whether /// the machine or the connection is the problem. Note which counter is which: /// /// and are the MACHINE's evidence — the pump /// could not produce a frame in time. /// is the ENCODER's — frames submitted but not accepted downstream. It /// rises when ffmpeg is blocked, which under CBR means the socket, not the renderer. /// is deliberately NOT used for classification: a static scene /// legitimately reuses the paste cache and renders few frames while completely healthy. /// /// public readonly record struct FramePumpStats( double WindowSeconds, int FramesSubmitted, int FramesRendered, double AvgRenderMs, double AvgSubmitMs, double AvgWaitMs, double WorstRenderMs, double WorstSubmitMs, int Dropped, int Stalls);