Commit c16024d6 authored by Renjie Tang's avatar Renjie Tang Committed by Commit Bot

Add histogram to record stream states when QUIC connection is closed due to idle timeout.

Bug: b/167434069
Change-Id: I57d5caef848498563e7932114cd880204b73c975
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2391736Reviewed-by: default avatarDavid Schinazi <dschinazi@chromium.org>
Commit-Queue: David Schinazi <dschinazi@chromium.org>
Auto-Submit: Renjie Tang <renjietang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#804346}
parent 437d1078
......@@ -1700,6 +1700,23 @@ void QuicChromiumClientSession::OnConnectionClosed(
const quic::QuicErrorCode error = frame.quic_error_code;
const std::string& error_details = frame.error_details;
if (source == quic::ConnectionCloseSource::FROM_SELF &&
error == quic::QUIC_NETWORK_IDLE_TIMEOUT && ShouldKeepConnectionAlive()) {
quic::QuicStreamCount streams_waiting_to_write = 0;
PerformActionOnActiveStreams(
[&streams_waiting_to_write](quic::QuicStream* stream) {
if (stream->HasBufferedData())
++streams_waiting_to_write;
return true;
});
UMA_HISTOGRAM_COUNTS_100(
"Net.QuicSession.NumStreamsWaitingToWriteOnIdleTimeout",
streams_waiting_to_write);
UMA_HISTOGRAM_COUNTS_100("Net.QuicSession.NumActiveStreamsOnIdleTimeout",
GetNumActiveStreams());
}
if (source == quic::ConnectionCloseSource::FROM_PEER) {
if (error == quic::QUIC_PUBLIC_RESET) {
// is_from_google_server will be true if the received EPID is
......
......@@ -103129,6 +103129,16 @@ reviews. Googlers can read more about this at go/gwsq-gerrit.
</summary>
</histogram>
<histogram name="Net.QuicSession.NumActiveStreamsOnIdleTimeout" units="streams"
expires_after="2021-05-11">
<owner>renjietang@chromium.org</owner>
<owner>src/net/quic/OWNERS</owner>
<summary>
The number of active streams when idle timeout is detected and connection is
being closed.
</summary>
</histogram>
<histogram name="Net.QuicSession.NumMigrationsExercisedBeforePublicReset"
units="migrations" expires_after="2021-05-11">
<owner>zhongyi@chromium.org</owner>
......@@ -103194,6 +103204,16 @@ reviews. Googlers can read more about this at go/gwsq-gerrit.
</summary>
</histogram>
<histogram name="Net.QuicSession.NumStreamsWaitingToWriteOnIdleTimeout"
units="streams" expires_after="2021-05-11">
<owner>renjietang@chromium.org</owner>
<owner>src/net/quic/OWNERS</owner>
<summary>
The number of streams waiting to write when idle timeout is detected and
connection is being closed.
</summary>
</histogram>
<histogram name="Net.QuicSession.NumTotalStreams" units="units"
expires_after="2021-05-11">
<owner>dschinazi@chromium.org</owner>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment