diff --git a/index.bs b/index.bs index 40e9ddff..f0f598d8 100644 --- a/index.bs +++ b/index.bs @@ -478,7 +478,7 @@ The dictionary SHALL have the following attributes: # `QuicTransportBase` Interface # {#quic-transport-base} -The `QuicTransportBase` is the base interface for {{QuicTransport}}. Most of +The `QuicTransportBase` is the base for {{QuicTransport}}. Most of the functionality of a `QuicTransport` is in the base class to allow for other subclasses (such as a p2p variant) to share the same interface. @@ -496,6 +496,7 @@ defined in [[!QUIC-DATAGRAM]].
interface QuicTransportBase { + Promise<QuicTransportStats> getStats(); }; QuicTransportBase includes UnidirectionalStreamsTransport; @@ -504,6 +505,67 @@ QuicTransportBase includes DatagramTransport; QuicTransportBase includes WebTransport;+## Methods ## {#quic-transport-base-methods} + +: getStats() +:: Gathers stats for this
QuicTransportBase
's QUIC
+ connection and reports the result asynchronously.
+
+ When close is called, the user agent MUST run the following steps:
+ 1. Let |transport| be the QuicTransportBase on which `getStats` is invoked.
+ 1. If |transport|'s {{[[WebTransportState]]}} is `"new"`, then abort
+ these steps.
+ 1. Let |p| be a new promise.
+ 1. Return |p| and continue the following steps in background.
+ 1. Gather the stats from the underlying QUIC connection.
+ 1. Once stats have been gathered, resolve |p| with the
+ {{QuicTransportStats}} object, representing the gathered stats.
+
+## `QuicTransportStats` Dictionary ## {#quic-transport-stats}
+
+The QuicTransportStats dictionary includes information
+on QUIC connection level stats.
+
++dictionary QuicTransportStats { + DOMHighResTimeStamp timestamp; + unsigned long long bytesSent; + unsigned long long packetsSent; + unsigned long numOutgoingStreamsCreated; + unsigned long numIncomingStreamsCreated; + unsigned long long bytesReceived; + unsigned long long packetsReceived; + DOMHighResTimeStamp minRtt; + unsigned long numReceivedDatagramsDropped; +}; ++ +The dictionary SHALL have the following attributes: + +: timestamp +:: The `timestamp` for when the stats are gathered, relative to the +UNIX epoch (Jan 1, 1970, UTC). +: bytesSent +:: The number of bytes sent on the QUIC connection, including retransmissions. +Does not include UDP or any other outer framing. +: packetsSent +:: The number of packets sent on the QUIC connection, including retransmissions. +: numOutgoingStreamsCreated +:: The number of outgoing QUIC streams created on the QUIC connection. +: numIncomingStreamsCreated +:: The number of incoming QUIC streams created on the QUIC connection. +: bytesReceived +:: The number of total bytes received on the QUIC connection, including +duplicate data for streams. Does not include UDP or any other outer framing. +: packetsReceived +:: The number of total packets received on the QUIC connection, including +packets that were not processable. +: minRtt +:: The minimum RTT observed on the entire connection. +: numReceivedDatagramsDropped +:: The number of datagrams that were dropped, due to too many datagrams buffered +between calls to {{receiveDatagrams()}}. + # `QuicTransport` Interface # {#quic-transport} The QuicTransport is a subclass of {{QuicTransportBase}} diff --git a/index.html b/index.html index 49602b2d..5324877c 100644 --- a/index.html +++ b/index.html @@ -1213,9 +1213,8 @@ } - + -