-
Notifications
You must be signed in to change notification settings - Fork 50
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
Adds getStats() method to QuicTransportBase. #43
Conversation
It seems I don't have contributor's access. Could someone help me out? The error says: |
@pthatcherg @aboba PTAL. I don't have access to add you as reviewers unfortunately. Thanks! |
The approach used in ORTC for handling per-object stats is a bit different. Using that approach, we would have something like this (could also be used if stats were desired for the IceTransport or QuicStream). interface QuicTransport : RTCStatsProvider { interface RTCStatsProvider { dictionary RTCStats { New RTCStatsType Enums would be needed, such as "quic-transport" and "quic-stream". dictionary QuicTransportStats : RTCStats { dictionary QuicStreamStats : RTCStats { |
@aboba I would prefer not to use this approach for a few reasons:
const transport = new QuicTransport(host, port);
const stream = await transport.createSendStream();
const streamStats = await stream.getStats();
const transportStats = await transport.getStats(); I'm open to doing it the ORTC way but I'd like to better understand the benefits and why we would want to do this. |
The major difference from what you are proposing is that in ORTC |
I was more calling out So the main advantage of the ORTC/WebRTC model is the self identification of the stats, that allows pulling the same stats from multiple objects. In our case that would mean you could get QUIC stream stats, ICE stats, as well as QUIC connection stats all from a QuicTranpsort.getStats() call. My opinion is that this model is over complicated for the WebTransport/QuicTransport case, because what we’re trying to do is expose a lower level object. I think pulling the stats from the objects directly is sufficient. Maybe @vr000m would like to weigh in. The main goal of this PR is to get some initial stats we can reference for discussions in open issues like the one around congestion control. WDYT of landing it then continuing the discussion around the stats model in a separate issue? |
In the ORTC model, each object has a |
@shampson Can you get nominated as a WICG member so your PRs can pass the IPR check? |
@aboba Victor helped me resolve the issue, thank you. Thanks for looking over the PR @vasilvv. Let's decide on the minimum stats we want to add now. I made a suggestion in a comment. I'd also like to discuss as a group the need for the ORTC model for stats. p.s. I snuck in the |
At the high level,
cc: @lennart-csio |
I created an issue for the stats API design. I think this PR is valuable to land without this discussion being resolved, so that we have a place to point to for other discussions like congestion control & datagram feedback. I'd be in favor of landing the simple stats API now (with a subset of the current metrics), then following up in the issue. How does that sound? |
I am okay with the way forward as long as we are open to make breaking changes when we have that discussion |
Breaking changes are fine to make right now and will be until the spec becomes more mature and is begins the process to ship. Development hasn't even begun for the WebTransport API in an origin trial. Since the RTCQuicTransport API shares the same base object, it is dependent on this as well before shipping. I'd like to resolve this before we have a WebTransport origin trial, which is intended as a way to experiment with APIs that don't become baked into the browser. |
@shampson Yes, am ok with landing this change and creating a new issue for API design. |
@vasilvv would you mind looking over this again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good with exception of couple of things I left comments for inline.
Okay, I've resolved all outstanding comments and merged with the bikshed PR, so the change is in index.bs now. @vasilvv thanks a lot for updating the spec to bikeshed, the merge was clumsy, but it's so much easier to edit! I don't have the ability to merge this, could an owner go ahead and land the PR? @pthatcherg @aboba |
index.bs
Outdated
:: The amount of total packets received on the QUIC connection, including | ||
packets that were not processable. | ||
: <dfn for="QuicTransportStats" dict-member>minRttUs</dfn> | ||
:: The minimum RTT. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Over what time window? The entire connection?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The entire connection. It looks like QUICHE does this for the entire time the connection has been open:
https://cs.chromium.org/chromium/src/net/third_party/quiche/src/quic/core/congestion_control/rtt_stats.cc?dr=CSs&g=0&l=43
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated to "The minimum RTT observed on the entire connection." Leaving this comment open and leaving it to you to resolve or suggest something different. I think this is the most straight forward thing to do, but maybe in the future a given time window would be better.
Thanks for also giving this a look @pthatcherg |
This basically is just reusing what was implemented in the RTCQuicTransport origin trial. Feel free to suggest removing/editing certain stats. The main motivation for this PR is:
See issues: