Closed Bug 2007202 Opened 10 months ago Closed 1 month ago

Implement WebTransport GetStats

Categories

(Core :: Networking: HTTP, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
158 Branch
Tracking Status
firefox158 --- fixed

People

(Reporter: jesup, Assigned: jesup)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

(Keywords: dev-doc-complete, Whiteboard: [necko-triaged], [wptsync upstream])

Attachments

(7 external files, 2 obsolete files)

No description provided.
Blocks: 1790674
No longer blocks: WebTransport
Depends on: 2007203
Severity: -- → N/A
Priority: -- → P2
Whiteboard: [necko-triaged]
Keywords: dev-doc-needed
Assignee: nobody → rjesup
Attachment #9534320 - Attachment description: WIP: Bug 2007202: Implement WebTransport getStats() r=#necko-reviewers!,#dom-reviewers! → Bug 2007202: Implement WebTransport getStats() r=#necko-reviewers!,saschanaz!
Status: NEW → ASSIGNED
Attachment #9545832 - Attachment description: Bug 2007202: expand WebTransport connection stats to include everything in the spec r=#necko-reviewers!,#dom-core! → Bug 2007202: Get stats from a WebTransport connection on close r=#necko-reviewers!

also add a wpt for server-initiated close for WebTransport getStats()

Cache WebTransport stats to allow getStats() after close: stats have to be
cached in the content process because we sever the IPC link to the parent
after close.

Support server-initiated closes

Add cycle collection for mPendingGetStatsPromises

Add spec comments for close-pending stats handling

Document the close-pending logic that queues getStats() requests during
user-initiated close to ensure final statistics are available. Also add
spec references for stats caching requirements.

neqo drops the session while processing the close, so by the time we drain
the SessionClosed event webtransport_session_stats() fails and we fell back
to Http3WebTransportSession's default-constructed mCachedStats: getStats()
after a server-initiated close reported zeros for every field.

Everything in WebTransportStatsData other than the session's datagram
counters comes from connection-level neqo counters, which are still
available at that point, so fall back to those rather than to zeros.

Attachment #9626033 - Attachment is obsolete: true
Attachment #9545832 - Attachment is obsolete: true
Pushed by rjesup@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/903617b6e0fa https://hg.mozilla.org/integration/autoland/rev/4e674f7236f0 Implement WebTransport getStats() r=saschanaz,necko-reviewers,webidl,kershaw,smaug,valentin https://github.com/mozilla-firefox/firefox/commit/a8818bc810c7 https://hg.mozilla.org/integration/autoland/rev/e640a40cbee5 Get stats from a WebTransport connection on close r=necko-reviewers,kershaw https://github.com/mozilla-firefox/firefox/commit/fc737da6ff20 https://hg.mozilla.org/integration/autoland/rev/7ee47aa07314 Update WebTransport getStats tests to include all fields r=jib https://github.com/mozilla-firefox/firefox/commit/04abbb639782 https://hg.mozilla.org/integration/autoland/rev/c3b462aeb15e Add more tests for getStats edge cases r=jib,necko-reviewers,valentin https://github.com/mozilla-firefox/firefox/commit/15ceda062ddc https://hg.mozilla.org/integration/autoland/rev/bca2b9ecd0bb report real WebTransport stats after a server-initiated close r=necko-reviewers,kershaw https://github.com/mozilla-firefox/firefox/commit/11452663c19f https://hg.mozilla.org/integration/autoland/rev/4ae5d03207fe Make a scriptable interface for WebTransport stats data for xpcshell tests r=necko-reviewers,valentin

Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/62634 for changes under testing/web-platform/tests

Whiteboard: [necko-triaged] → [necko-triaged], [wptsync upstream]
QA Whiteboard: [qa-triage-done-c159/b158]

FF158 MDN docs work for this can be tracked in https://github.com/mdn/content/issues/45893

getStats() only exposes the stats the user agent wishes to, so every
WebTransportConnectionStats and WebTransportDatagramStats member is
optional except datagrams, estimatedSendRate and atSendCapacity, which
WebIDL guarantees are present because they are required or have defaults.

Pushed by rjesup@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/d83bf36f96fd https://hg.mozilla.org/integration/autoland/rev/a72a1a38a4ff Only check WebTransport stats members that are present in stats.https.any.js r=jib

A patch has been attached on this bug, which was already closed. Filing a separate bug will ensure better tracking. If this was not by mistake and further action is needed, please alert the appropriate party. (Or: if the patch doesn't change behavior -- e.g. landing a test case, or fixing a typo -- then feel free to disregard this message)

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: