- From: Jan-Ivar Bruaroey via GitHub <sysbot+gh@w3.org>
- Date: Fri, 28 Feb 2025 21:46:45 +0000
- To: public-webrtc-logs@w3.org
> > I think the concern in this case is: > > ... > > 2. whether an anticipated use case is A/B codec testing where a website might tune its interval to the fastest browser > > Polling is just asking "do you have any new measurements for me?" Whether I poll once per 15 seconds and get that measurement on the first try or if I poll getStats 15 times and get 14 "no's" and 1 "yes", I think I end up in the same situation, so what exactly was the problem there That's fine for telemetry. I think our concern was more someone making *runtime* decisions off stats, e.g.: ```js // probe and switch to best codec for media being sent right now: let bestCodec, bestY = 0; for (const codec of sender.getParameters().codecs) { const params = sender.getParameters(); params.encodings[0].codec = codec; await sender.setParameters(params); await wait(1000); const ortp1 = [...(await sender.getStats()).values()].find(({type}) => type == "outbound-rtp"); await wait(1000); const ortp2 = [...(await sender.getStats()).values()].find(({type}) => type == "outbound-rtp"); const y = (ortp2.psnrSum.y - ortp1.psnrSum.y) / (ortp2.psnrMeasurements - ortp1.psnrMeasurements); if (bestY < y) { bestY = y; bestCodec = codec; } const params = sender.getParameters(); params.encodings[0].codec = bestCodec; } await sender.setParameters(params); ``` > (and why is this different from the other hundred+ metrics we have)? No other stat has this note: <img width="633" alt="image" src="https://github.com/user-attachments/assets/49a356f1-1b18-4a26-8251-8bb82ead5463" /> > FTR I think 15 second is too large of an interval since a lot can happen in that period of time. This might be good for an implementer to know. -- GitHub Notification of comment by jan-ivar Please view or discuss this issue at https://github.com/w3c/webrtc-stats/pull/794#issuecomment-2691600502 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 28 February 2025 21:46:46 UTC