-
-
Notifications
You must be signed in to change notification settings - Fork 629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export WebRTC transport stats #802
Comments
Yeah I would lean toward it being fine to have a WebRTC specific stats thing here. Your method on |
Yeah I'm actually interested in the torrent peer connection to evaluate, for example, packet loss during file transfer. I worked on |
I opened #803 in draft, as I think there might be some issue getting the stats at the right time before the peer connection is closed, which might result in missing stats. |
Thanks for your efforts on this. I'm not using the WebRTC stuff heavily right now, so I'm a bit in the dark about your insights. |
I recently went back to the issue of WebRTC stats and I just opened #983. This builds on the previous work, but I think now stats on open peer connections are handled better. Would be great to have your thoughts on it, @anacrolix. |
I'm interested in monitoring the quality of the transport via data channel when a transfer is carried out via webtorrent. To do so, I need to access the WebRTC transport stats.
Pion provides stats for the data channel by calling
GetStats()
on thepeerConnection
struct. To be able to call this method during a transfer, I've done the following:GetTransportStats()
method onTrackerClient
, which has access to the wrappedpeerConnection
via theoutboundOffers
map:GetWebRtcPeerConnStats()
method onTorrent
that callsGetTransportStats()
on everyTrackerClient
int.cl.websocketTrackers.clients
:This is a quick solution I came up with and it can surely be improved.
@anacrolix I'm interested in hearing your thoughts on this approach as I'd like to make a PR of this. I'm thinking, from an API perspective, it would probably make sense to have a single 'transport stats' function regardless of the type of transport, but then I'm not sure what this function would return, since each transport will provide a different set of stats...
The text was updated successfully, but these errors were encountered: