Skip to content
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

Add stats.atSendCapacity #603

Merged
merged 16 commits into from
Oct 8, 2024
Merged
63 changes: 48 additions & 15 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1408,7 +1408,7 @@ dictionary WebTransportCloseInfo {
};
</pre>

The dictionary SHALL have the following attributes:
The dictionary SHALL have the following members:

: <dfn for="WebTransportCloseInfo" dict-member>closeCode</dfn>
:: The error code communicated to the peer.
Expand All @@ -1430,7 +1430,7 @@ dictionary WebTransportSendStreamOptions {
};
</pre>

The dictionary SHALL have the following attributes:
The dictionary SHALL have the following members:

: <dfn for="WebTransportSendStreamOptions" dict-member>sendGroup</dfn>
:: An optional {{WebTransportSendGroup}} to [=group=] this
Expand Down Expand Up @@ -1486,11 +1486,11 @@ dictionary WebTransportConnectionStats {
DOMHighResTimeStamp rttVariation;
DOMHighResTimeStamp minRtt;
WebTransportDatagramStats datagrams;
unsigned long long? estimatedSendRate;
WebTransportSendRateStats? sendRate;
};
</pre>

The dictionary SHALL have the following attributes:
The dictionary SHALL have the following members:

: <dfn for="WebTransportConnectionStats" dict-member>bytesSent</dfn>
:: The number of bytes sent on the [=underlying connection=], including retransmissions.
Expand All @@ -1517,14 +1517,13 @@ The dictionary SHALL have the following attributes:
[Section 5.3](https://www.rfc-editor.org/rfc/rfc9002#section-5.3).
: <dfn for="WebTransportConnectionStats" dict-member>minRtt</dfn>
:: The minimum round-trip time observed on the entire connection.
: <dfn for="WebTransportConnectionStats" dict-member>estimatedSendRate</dfn>
:: The estimated rate at which queued data will be sent by the user agent, in bits per second.
This rate applies to all streams and datagrams that share a [=WebTransport session=]
and is calculated by the congestion control algorithm (potentially chosen by
{{WebTransport/congestionControl}}). If the user agent does not
currently have an estimate, the member MUST be the `null` value.
The member can be `null` even if it was not `null` in previous results.

: <dfn for="WebTransportConnectionStats" dict-member>datagrams</dfn>
:: Contains statistics on datagram transmission over the [=underlying connection=].
: <dfn for="WebTransportConnectionStats" dict-member>sendRate</dfn>
:: Contains congestion control information such as an estimated send
rate. If the user agent does not currently have this information,
the member MUST be the `null` value. The member can be `null` even
if it was not `null` in previous results.

## `WebTransportDatagramStats` Dictionary ## {#web-transport-datagram-stats}

Expand All @@ -1540,7 +1539,7 @@ dictionary WebTransportDatagramStats {
};
</pre>

The dictionary SHALL have the following attributes:
The dictionary SHALL have the following members:

: <dfn for="WebTransportDatagramStats" dict-member>droppedIncoming</dfn>
:: The number of incoming datagrams that were dropped due to the application not reading
Expand All @@ -1557,6 +1556,40 @@ The dictionary SHALL have the following attributes:
:: The number of sent datagrams that were declared lost, as defined in
[[!RFC9002]] [Section 6.1](https://www.rfc-editor.org/rfc/rfc9002#section-6.1).

## `WebTransportSendRateStats` Dictionary ## {#web-transport-sendrate-stats}

The <dfn dictionary>WebTransportSendRateStats</dfn> dictionary includes statistics
on datagram transmission over the [=underlying connection=].

<pre class="idl">
dictionary WebTransportSendRateStats {
required unsigned long long estimate;
required boolean isDataLimited;
required boolean isServerLimited;
required boolean inSlowStart;
};
</pre>

The dictionary SHALL have the following members:

: <dfn for="WebTransportSendRateStats" dict-member>estimate</dfn>
:: The estimated rate at which queued data will be sent by the user agent, in bits per second.
This rate applies to all streams and datagrams that share a [=WebTransport session=]
and is calculated by the congestion control algorithm (potentially chosen by
{{WebTransport/congestionControl}}).
: <dfn for="WebTransportSendRateStats" dict-member>isDataLimited</dfn>
:: True if the rate at which queued data will be sent by the user agent on all streams
that share a [=WebTransport session=], as calculated by the
congestion control algorithm, is considered application limited. Otherwise false.
Datagrams MUST NOT be included in this calculation.
jan-ivar marked this conversation as resolved.
Show resolved Hide resolved
: <dfn for="WebTransportSendRateStats" dict-member>isServerLimited</dfn>
:: True if the rate at which queued data will be sent by the user agent on all streams
and datagrams that share a [=WebTransport session=], as calculated by the
congestion control algorithm, is considered limited by back pressure from the server. Otherwise false.
jan-ivar marked this conversation as resolved.
Show resolved Hide resolved
jan-ivar marked this conversation as resolved.
Show resolved Hide resolved
: <dfn for="WebTransportSendRateStats" dict-member>inSlowStart</dfn>
:: True if the current congestion control algorithm implements "slow start" and the
[=WebTransport session=] is currently in this mode. Otherwise false.

# Interface `WebTransportSendStream` # {#send-stream}

A {{WebTransportSendStream}} is a {{WritableStream}} providing outgoing streaming
Expand Down Expand Up @@ -1866,7 +1899,7 @@ dictionary WebTransportSendStreamStats {
};
</pre>

The dictionary SHALL have the following attributes:
The dictionary SHALL have the following members:

: <dfn for="WebTransportSendStreamStats" dict-member>bytesWritten</dfn>
:: The total number of bytes the application has successfully written to this
Expand Down Expand Up @@ -2175,7 +2208,7 @@ dictionary WebTransportReceiveStreamStats {
};
</pre>

The dictionary SHALL have the following attributes:
The dictionary SHALL have the following members:

: <dfn for="WebTransportReceiveStreamStats" dict-member>bytesReceived</dfn>
:: An indicator of progress on how many of the server application's bytes
Expand Down
Loading