Open Bug 1542938 Opened 6 years ago Updated 3 months ago

Need to implement currentRoundTripTime, totalRoundTripTime and responsesReceived webrtc stats

Categories

(Core :: WebRTC, enhancement, P2)

68 Branch
enhancement

Tracking

()

REOPENED

People

(Reporter: eliassun, Unassigned)

References

(Blocks 1 open bug)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:66.0) Gecko/20100101 Firefox/66.0

Steps to reproduce:

Get the candidate-pair from the webrtc by

let pc = peerConnection;
pc.getStats().then(stats => {
stats.forEach(report => {
case 'candidate-pair':

It doesn't contain
'currentRoundTripTime' and 'totalRoundTripTime'

Actual results:

The "candidate-pair" contains the fields:

bytesReceived
bytesSent
componentId
id
lastPacketReceivedTimestamp
lastPacketSentTimestamp
localCandidateId
nominated
priority
readable
remoteCandidateId
selected
state
timestamp
transportId
type

Expected results:

It should contain more, including

double totalRoundTripTime;
double currentRoundTripTime;

https://www.w3.org/TR/webrtc-stats/#dom-rtcicecandidatepairstats

Component: Untriaged → WebRTC
Product: Firefox → Core

Looks like these are still part of the editor's draft: https://w3c.github.io/webrtc-stats/#candidatepair-dict*.

Status: UNCONFIRMED → NEW
Type: defect → enhancement
Ever confirmed: true
Priority: -- → P3

hi Dan,
Chrome and Safari did it already. Can you make it happen soon? Now, we have nowhere to get the round trip as https://bugzilla.mozilla.org/show_bug.cgi?id=1542941 is closed.

Thanks,

Elias

I'm not very familiar with our stats code, but from the comments on Bug 1542941, it sounds like you can get what you are looking for from the roundTripTime field in https://w3c.github.io/webrtc-stats/#dom-rtcremoteinboundrtpstreamstats. I had a quick look at our ICE code and it doesn't seem like we have anything in place to easily calculate round trip time there. Nico would know more.

Flags: needinfo?(na-g)

Dan, Eliassun, our ICE stack doesn't compute roundTripTime, and the RTT calculated by the ICE protocol is not very useful because the sample rate is very low. There is talk on the webrt-stats spec[0] about adding the SCTP round trip time which is more robust to the transport stats. If that goes through, that is very likely what we will implement. This bug should be left open until that all shakes out, even though it is very unlikely that we will implement RTT calculations in nICER.

[0] https://github.com/w3c/webrtc-stats/issues/376

Flags: needinfo?(na-g)

Hi Dan,

Was curious if this might be prioritized soon given the spike in WebRTC usage as many work from home.

Safari, Edge and Chrome support these fields now, and some video conferencing tools that rely on WebRTC now show RTT stats to users. For example, on Google Meet you can go to Help & Troubleshooting and see a graph of recent RTT data. Unfortunately, this isn't yet possible in Firefox.

Thanks,

Brad

Hi Brad,

It looks like the decision was made to implement SCTP round trip time [0], so we won't add RTT calculation to our ICE stack. Our ICE stack (nICEr) is in maintenance mode at this point, so we're not planning to add new features unless absolutely required. Bug 1642286 tracks adding RTCSctpTransportStats.

Sorry,

Dan

[0] https://github.com/w3c/webrtc-stats/issues/376#issuecomment-533431995

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX

Ok, so https://github.com/w3c/webrtc-stats/issues/376#issuecomment-533431995 notwithstanding, this stat is still in the mandatory-to-implement list... what's going on with this?

^

Flags: needinfo?(jib)

"sctp-transport" stats were removed in https://github.com/w3c/webrtc-stats/pull/627 for lack of implementation (they now exist here).

This is probably why the ICE ones remain mandatory, because other browsers implement them, and there's no other API for RTT.

Flags: needinfo?(jib)

We should probably either reopen this, or we could implement and ship smoothedRoundTripTime (and maybe some of the other "sctp-transport" members we want?) and try to lobby for its re-inclusion, and THEN lobby for dropping this one by making it no longer mandatory to implement.

Reopening until comment 10 has been resolved.

Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Severity: normal → S3
Summary: Need to implement currentRoundTripTime and totalRoundTripTime in webrtc → Need to implement currentRoundTripTime, totalRoundTripTime and responsesReceived webrtc stats
Blocks: 1903089
Priority: P3 → P2
You need to log in before you can comment on or make changes to this bug.