PSA: Standardized stats in chrome://webrtc-internals/ in M75 (Now in Canary)

640 views
Skip to first unread message

Henrik Boström

unread,
Apr 26, 2019, 1:21:05 PM4/26/19
to discuss-webrtc
chrome://webrtc-internals/ now display stats from the standardized getStats() API and also allows downloading them ("Create dump").

Screenshot from 2019-04-26 18-47-38.png


Screenshot from 2019-04-26 18-49-27.png


The standardized API is the API that does not take a callback as argument but returns a promise that is resolved with an RTCStatsReport.
The stats are documented here: https://w3c.github.io/webrtc-stats/
(Only a handful of returned metrics have not been added to the main spec yet, these are publicly documented here: https://henbos.github.io/webrtc-provisional-stats/)

Because the standardized API is primarily based on accumulative metrics, averages can easily be calculated for any time interval by calling getStats() twice and dividing the difference with the difference in timestamp.
The chrome://webrtc-internals/ graphs and dumps include derived metrics like rates (based on total counters) and average audio level (based on root mean square values of total audio energy).

This page should aid developers migrating from the legacy (callback-based) getStats() API to the standardized and documented option, and help debugging applications with modern stats.
More standardized metrics are planned to be implemented for M76, see https://bugs.chromium.org/p/webrtc/issues/detail?id=10428 and BlockedOn issues for recent activity in this area.

If you are still relying on "goog" stats you are still able to view the legacy stats in chrome://webrtc-internals/ by using the drop-down menu at the top of the page. We want to deprecate the legacy API but have not announced a time-frame yet.

Henrik Boström

unread,
Apr 26, 2019, 1:23:38 PM4/26/19
to discuss-webrtc

Sergio Garcia Murillo

unread,
Apr 29, 2019, 11:21:09 AM4/29/19
to discuss...@googlegroups.com
are the stat for bweforvideo going to be removed also? They are really important IMHO an there is nothing standard api that provides same information.

Best regards
Sergio
--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/20aa0229-1896-44b2-b204-f5ff20ff8952%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Henrik Boström

unread,
May 14, 2019, 9:46:40 AM5/14/19
to discuss-webrtc
(Sorry for the delay in replying, for some reason this doesn't show up in my inbox)
See RTCIceCandidatePairStats.availableOutgoingBitrate on the appropriate candidate pair. This is the equivalent of "googAvailableSendBandwidth".
To unsubscribe from this group and stop receiving emails from it, send an email to discuss...@googlegroups.com.

Henrik Boström

unread,
May 14, 2019, 9:48:42 AM5/14/19
to discuss-webrtc

Sergio Garcia Murillo

unread,
May 14, 2019, 9:51:22 AM5/14/19
to discuss...@googlegroups.com
Thank you Henrik! that was what I was looking for.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/b40e991d-7eaa-4a06-a74c-a2563e859992%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages