{"action":"created","issue":{"url":"https://api.github.com/repos/w3c/webrtc-stats/issues/339","repository_url":"https://api.github.com/repos/w3c/webrtc-stats","labels_url":"https://api.github.com/repos/w3c/webrtc-stats/issues/339/labels{/name}","comments_url":"https://api.github.com/repos/w3c/webrtc-stats/issues/339/comments","events_url":"https://api.github.com/repos/w3c/webrtc-stats/issues/339/events","html_url":"https://github.com/w3c/webrtc-stats/issues/339","id":302936616,"number":339,"title":"Add stat for RTTs between client and STUN/TURN server","user":{"login":"taylor-b","id":14118599,"avatar_url":"https://avatars3.githubusercontent.com/u/14118599?v=4","gravatar_id":"","url":"https://api.github.com/users/taylor-b","html_url":"https://github.com/taylor-b","followers_url":"https://api.github.com/users/taylor-b/followers","following_url":"https://api.github.com/users/taylor-b/following{/other_user}","gists_url":"https://api.github.com/users/taylor-b/gists{/gist_id}","starred_url":"https://api.github.com/users/taylor-b/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taylor-b/subscriptions","organizations_url":"https://api.github.com/users/taylor-b/orgs","repos_url":"https://api.github.com/users/taylor-b/repos","events_url":"https://api.github.com/users/taylor-b/events{/privacy}","received_events_url":"https://api.github.com/users/taylor-b/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-03-07T01:59:11Z","updated_at":"2018-03-14T14:19:50Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"We already have `totalRoundTripTime` in `RTCIceCandidatePairStats`, and `roundTripTime` in `RTCRemoteInboundRtpStreamStats`, but these are both an end-to-end round trip time.\r\n\r\nI suggest adding a similar stat to `RTCIceCandidateStats`, which would accumulate round trip times as measured by STUN transactions between client and STUN server (from initial candidate gathering, keepalives for NAT bindings, TURN refreshes, etc.). We've encountered a couple uses for this:\r\n\r\n- It can provide some information about the endpoint's Internet connection even before connecting to a remote endpoint.\r\n- Once connected, it can help indicate which side of the connection is contributing more to latency.\r\n\r\nSo I'd suggest adding something like:\r\n\r\n- `totalStunRoundTripTime`\r\n- `totalStunResponsesReceived` (divide by this to get average RTT)\r\n- `totalStunRequestsSent` (allows you to detect packet loss)\r\n\r\nOr maybe `totalStunServerRoundTripTime` would be a better name, to make it extra clear that this is between the client and STUN server, and doesn't include connectivity checks."},"comment":{"url":"https://api.github.com/repos/w3c/webrtc-stats/issues/comments/373037381","html_url":"https://github.com/w3c/webrtc-stats/issues/339#issuecomment-373037381","issue_url":"https://api.github.com/repos/w3c/webrtc-stats/issues/339","id":373037381,"user":{"login":"alvestrand","id":480893,"avatar_url":"https://avatars2.githubusercontent.com/u/480893?v=4","gravatar_id":"","url":"https://api.github.com/users/alvestrand","html_url":"https://github.com/alvestrand","followers_url":"https://api.github.com/users/alvestrand/followers","following_url":"https://api.github.com/users/alvestrand/following{/other_user}","gists_url":"https://api.github.com/users/alvestrand/gists{/gist_id}","starred_url":"https://api.github.com/users/alvestrand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alvestrand/subscriptions","organizations_url":"https://api.github.com/users/alvestrand/orgs","repos_url":"https://api.github.com/users/alvestrand/repos","events_url":"https://api.github.com/users/alvestrand/events{/privacy}","received_events_url":"https://api.github.com/users/alvestrand/received_events","type":"User","site_admin":false},"created_at":"2018-03-14T14:19:50Z","updated_at":"2018-03-14T14:19:50Z","author_association":"CONTRIBUTOR","body":"I think we have multiple mixups here:\r\n- One stun server providing multiple addresses\r\n- multiple stun servers providing one address\r\n\r\nSuggest adding a stunserver object, containing:\r\n\r\n- URL\r\n- local address used to communicate with the server (hostport, including address family)\r\n- # of requests sent\r\n- # of responses received\r\n- sum of RTT for received responses\r\n\r\nThat would make it independent of candidates.\r\n"}}
{"actor":{"display_login":"alvestrand"}}