Skip to content

Commit 4591d36

Browse files
Fan YangCommit Bot
Fan Yang
authored and
Commit Bot
committed
Add 2 histograms which exposes last packet sent time delta and connection duration when receiving PUBLIC_RESET.
R=dschinazi@chromium.org Change-Id: I75ae9c95b13273ef1421b28113e11c5dd63bc59e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2366913 Commit-Queue: David Schinazi <dschinazi@chromium.org> Reviewed-by: David Schinazi <dschinazi@chromium.org> Cr-Commit-Position: refs/heads/master@{#800155}
1 parent e1e0b79 commit 4591d36

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

net/quic/quic_chromium_client_session.cc

+22
Original file line numberDiff line numberDiff line change
@@ -1729,6 +1729,28 @@ void QuicChromiumClientSession::OnConnectionClosed(
17291729
->sent_packet_manager()
17301730
.unacked_packets()
17311731
.GetLastPacketContent());
1732+
1733+
const quic::QuicTime last_in_flight_packet_sent_time =
1734+
connection()
1735+
->sent_packet_manager()
1736+
.unacked_packets()
1737+
.GetLastInFlightPacketSentTime();
1738+
const quic::QuicTime handshake_completion_time =
1739+
connection()->GetStats().handshake_completion_time;
1740+
if (last_in_flight_packet_sent_time.IsInitialized() &&
1741+
handshake_completion_time.IsInitialized() &&
1742+
last_in_flight_packet_sent_time >= handshake_completion_time) {
1743+
const quic::QuicTime::Delta delay =
1744+
last_in_flight_packet_sent_time - handshake_completion_time;
1745+
UMA_HISTOGRAM_LONG_TIMES_100(
1746+
"Net.QuicSession."
1747+
"LastInFlightPacketSentTimeFromHandshakeCompletionWithPublicReset",
1748+
base::TimeDelta::FromMilliseconds(delay.ToMilliseconds()));
1749+
}
1750+
1751+
UMA_HISTOGRAM_LONG_TIMES_100(
1752+
"Net.QuicSession.ConnectionDurationWithPublicReset",
1753+
tick_clock_->NowTicks() - connect_timing_.connect_end);
17321754
}
17331755
if (OneRttKeysAvailable()) {
17341756
base::HistogramBase* histogram = base::SparseHistogram::FactoryGet(

tools/metrics/histograms/histograms.xml

+18
Original file line numberDiff line numberDiff line change
@@ -101671,6 +101671,13 @@ reviews. Googlers can read more about this at go/gwsq-gerrit.
101671101671
</summary>
101672101672
</histogram>
101673101673

101674+
<histogram name="Net.QuicSession.ConnectionDurationWithPublicReset" units="ms"
101675+
expires_after="2021-05-11">
101676+
<owner>fayang@chromium.org</owner>
101677+
<owner>src/net/quic/OWNERS</owner>
101678+
<summary>Duration of connections received PUBLIC_RESET.</summary>
101679+
</histogram>
101680+
101674101681
<histogram name="Net.QuicSession.ConnectionFlowControlBlocked"
101675101682
enum="BooleanBlocked" expires_after="2021-05-11">
101676101683
<owner>dschinazi@chromium.org</owner>
@@ -102036,6 +102043,17 @@ reviews. Googlers can read more about this at go/gwsq-gerrit.
102036102043
</summary>
102037102044
</histogram>
102038102045

102046+
<histogram
102047+
name="Net.QuicSession.LastInFlightPacketSentTimeFromHandshakeCompletionWithPublicReset"
102048+
units="ms" expires_after="2021-05-11">
102049+
<owner>fayang@chromium.org</owner>
102050+
<owner>src/net/quic/OWNERS</owner>
102051+
<summary>
102052+
Time from handshake completion to last packet was sent for connections
102053+
received PUBLIC_RESET.
102054+
</summary>
102055+
</histogram>
102056+
102039102057
<histogram name="Net.QuicSession.LastSentPacketContentBeforePublicReset"
102040102058
units="bitfield value" expires_after="2021-05-11">
102041102059
<owner>fayang@chromium.org</owner>

0 commit comments

Comments
 (0)