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

Adds getStats() method to QuicTransportBase. #43

Merged
merged 6 commits into from
Sep 5, 2019
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 120 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -719,9 +719,8 @@ <h2>Methods</h2>
<p>If not, return a new promise that will resolve when more datagrams are received,
resolved with all datagrams received. </p>
<p>If too many datagrams are queued between calls to receiveDatagrams(),
the implementation may drop datagrams and replace them with a null value
in the sequence of datagrams returned in the next call to receiveDatagrams().
One null value may represent many dropped datagrams.<p>
the implementation may drop datagrams. This will be reflected in the
<code>QuicTransportStats</code>.<p>
shampson marked this conversation as resolved.
Show resolved Hide resolved
<p>receiveDatagrams() may only be called once at a time.
If a promised returned from a previous call is still unresolved,
the user agent MUST return a new promise rejected with an InvalidStateError. </p>
Expand Down Expand Up @@ -987,10 +986,9 @@ <h2>Dictionary <a class="idlType">WebTransportCloseInfo</a> Members</h2>
</section>

<section id="quic-transport-base*">
<h2><dfn>QuicTransportBase</dfn> Interface</h2>
<p>The <code>QuicTransportBase</code> is the base interface
for <code>QuicTransport</code>. Most of the functionality of a
QuicTransport is in the base class to allow for other
<h2><dfn>QuicTransportBase</dfn> Mixin</h2>
<p>The <code>QuicTransportBase</code> is the base for <code>QuicTransport</code>.
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.
</p>
<section id="quictransportbase-overview*">
Expand All @@ -1009,6 +1007,7 @@ <h3>Interface Definition</h3>
<div>
<pre class="idl">
interface QuicTransportBase {
Promise&lt;QuicTransportStats&gt; getStats();
};

QuicTransportBase includes UnidirectionalStreamsTransport;
Expand All @@ -1017,6 +1016,120 @@ <h3>Interface Definition</h3>
QuicTransportBase includes WebTransport;</pre>
</div>
</section>
<section>
<h2>Methods</h2>
<dl data-link-for="QuicTransportBase" data-dfn-for="QuicTransportBase" class=
"methods">
<dt><dfn><code>getStats</code></dfn></dt>
<dd>
<p>Gathers stats for this <code><a>QuicTransportBase</a></code>'s QUIC connection and reports
the result asynchronously.</p>
<p>When <code>getStats</code> is called, the user agent <em class="rfc2119" title="MUST">MUST</em>
run the following steps:</p>
<ol>
<li>Let <var>transport</var> be the <code><a>QuicTransportBase</a></code>
on which <code>getStats</code> is invoked.</li>
<li>If <var>transport</var>'s <a>[[\WebTransportState]]</a> is <code>"new"</code>
then abort these steps.</li>
<li>Return <var>p</var> and continue the following steps in the background.</li>
<ol>
<li>Gather the stats from the underlying QUIC connection.</li>
<li>Once stats have been gathered, resolve <var>p</var> with the
<code><a>QuicTransportStats</a></code> object, representing the gathered
stats</li>
</ol>
</ol>
<div>
<em>No parameters.</em>
</div>
<div>
<em>Return type:</em> <code><a>QuicTransportStats</a></code>
</div>
</dd>
</section>
<section id="quictransportstats*">
<h3><dfn>QuicTransportStats</dfn> Dictionary</h3>
<p>The <code>QuicTransportStats</code> dictionary includes information
QUIC connection level stats.
<div>
<pre class="idl">
dictionary QuicTransportStats {
shampson marked this conversation as resolved.
Show resolved Hide resolved
DOMHighResTimeStamp timestamp;
unsigned long long bytesSent;
unsigned long long packetsSent;
unsigned long numOutgoingStreamsCreated;
unsigned long numIncomingStreamsCreated;
unsigned long long bytesReceived;
unsigned long long packetsReceived;
unsigned long long minRttUs;
unsigned long estimatedBandwidthBps;
unsigned long numReceivedDatagramsDropped;
};</pre>
<section>
<h2>Dictionary <a class="idlType">QuicTransportStats</a> Members</h2>
<dl data-link-for="QuicTransportStats" data-dfn-for="QuicTransportStats" class=
"dictionary-members">
<dt><dfn><code>timestamp</code></dfn> of type <span class=
"idlMemberType"><a>DOMHighResTimeStamp</a></span></dt>
<dd>
<p>The <code>timestamp</code> for when the stats are gathered, relative to the
UNIX epoch (Jan 1, 1970, UTC)</p>
</dd>
<dt><dfn><code>bytesSent</code></dfn> of type <span class=
"idlMemberType"><a>unsigned long long</a></span></dt>
<dd>
<p>The amount of bytes sent on the QUIC connection, including
retransmissions. Does not include UDP/IP/ethernet framing.</p>
shampson marked this conversation as resolved.
Show resolved Hide resolved
</dd>
<dt><dfn><code>packetsSent</code></dfn> of type <span class=
"idlMemberType"><a>unsigned long long</a></span></dt>
<dd>
<p>The amount of packets sent</code> on the QUIC connection, including
shampson marked this conversation as resolved.
Show resolved Hide resolved
retransmissions.</p>
</dd>
<dt><dfn><code>numOutgoingStreamsCreated</code></dfn> of type <span class=
"idlMemberType"><a>unsigned long</a></span></dt>
<dd>
<p>The amount of outgoing QUIC streams created on the QUIC connection.</p>
</dd>
<dt><dfn><code>numIncomingStreamsCreated</code></dfn> of type <span class=
"idlMemberType"><a>unsigned long</a></span></dt>
<dd>
<p>The amount of incoming QUIC streams created on the QUIC connection.</p>
</dd>
<dt><dfn><code>bytesReceived</code></dfn> of type <span class=
"idlMemberType"><a>unsigned long long</a></span></dt>
<dd>
<p>The amount of total bytes received on the QUIC connection, including
duplicate data for streams. Does not include UDP/IP/ethernet framing.</p>
shampson marked this conversation as resolved.
Show resolved Hide resolved
</dd>
<dt><dfn><code>packetsReceived</code></dfn> of type <span class=
"idlMemberType"><a>unsigned long long</a></span></dt>
<dd>
<p>The amount of total packets received on the QUIC connection, including
packets that were not processable.</p>
</dd>
<dt><dfn><code>minRttUs</code></dfn> of type <span class=
"idlMemberType"><a>unsigned long long</a></span></dt>
<dd>
<p>The minimum RTT in microseconds.</p>
shampson marked this conversation as resolved.
Show resolved Hide resolved
</dd>
<dt><dfn><code>estimatedBandwidthBps</code></dfn> of type <span class=
shampson marked this conversation as resolved.
Show resolved Hide resolved
"idlMemberType"><a>unsigned long</a></span></dt>
<dd>
<p>The estimated bandwidth in bits per second determined by the QUIC
connection.</p>
</dd>
<dt><dfn><code>numReceivedDatagramsDropped</code></dfn> of type <span class=
"idlMemberType"><a>unsigned long</a></span></dt>
<dd>
<p>The number of datagrams that were dropped, due to too many datagrams buffered
between calls to <code>receiveDatagrams()</code>.</p>
</dd>
</dl>
</section>
</div>
</section>
</section>

<section id="quic-transport*">
Expand Down