Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(524)

Unified Diff: net/quic/quic_stream_factory.cc

Issue 183853028: Add a histogram to track the number of QUIC packets received by a QUIC (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comments Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_stream_factory.cc
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc
index f445cd3e8f7a07579cc0fe7e5cab6cf3fa55ea5f..3347d77a77195187e0360c1240d1bc3c4f421a8e 100644
--- a/net/quic/quic_stream_factory.cc
+++ b/net/quic/quic_stream_factory.cc
@@ -425,6 +425,7 @@ void QuicStreamFactory::OnIdleSession(QuicClientSession* session) {
}
void QuicStreamFactory::OnSessionGoingAway(QuicClientSession* session) {
+ const QuicConnectionStats& stats = session->connection()->GetStats();
const AliasSet& aliases = session_aliases_[session];
for (AliasSet::const_iterator it = aliases.begin(); it != aliases.end();
++it) {
@@ -446,14 +447,16 @@ void QuicStreamFactory::OnSessionGoingAway(QuicClientSession* session) {
// differently so that we still race TCP but we don't consider the
// session connected until the handshake has been confirmed.
http_server_properties_->SetBrokenAlternateProtocol(it->first);
- } else {
- QuicConnectionStats stats = session->connection()->GetStats();
- HttpServerProperties::NetworkStats network_stats;
- network_stats.rtt = base::TimeDelta::FromMicroseconds(stats.rtt);
- network_stats.bandwidth_estimate = stats.estimated_bandwidth;
- http_server_properties_->SetServerNetworkStats(
- it->first, network_stats);
+ UMA_HISTOGRAM_COUNTS("Net.QuicHandshakeNotConfirmedNumPacketsReceived",
+ stats.packets_received);
+ continue;
}
+
+ HttpServerProperties::NetworkStats network_stats;
+ network_stats.rtt = base::TimeDelta::FromMicroseconds(stats.rtt);
+ network_stats.bandwidth_estimate = stats.estimated_bandwidth;
+ http_server_properties_->SetServerNetworkStats(
+ it->first, network_stats);
}
IPEndPoint peer_address = session->connection()->peer_address();
ip_aliases_[peer_address].erase(session);
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698