w3c / webrtc-stats

WebRTC Statistics
https://w3c.github.io/webrtc-stats/
Other
129 stars 47 forks source link

How do we handle overflow of metrics #496

Open vr000m opened 5 years ago

vr000m commented 5 years ago

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.
alvestrand commented 5 years ago

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.