webrtc-stats icon indicating copy to clipboard operation
webrtc-stats copied to clipboard

How do we handle overflow of metrics

Open vr000m opened this issue 6 years ago • 1 comments

for example packetSent is represented by a 32-bit in RTP/RTCP. If it overflows does the webrtc-stats report:

  1. keeps counting up, we are not limited in such cases we use "unsigned long long"
  2. become undefined instead of reporting a constant over-range value.

vr000m avatar Sep 16 '19 15:09 vr000m

Local counters are under our control, we should just keep counting up. Remote counters that are passed in RTCP are more of an issue - what do the IETF specs say? Back of the envelope: For 1 Kbyte packets in a 10 Mbits/sec video RTP session, we'll have ~1K packets/second, so the 32-bit packet counter will wrap in 49 days - this is not totally unthinkable, but rare enough that it's not likely to show up in casual testing.

alvestrand avatar Sep 17 '19 00:09 alvestrand