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

Side by Side Diff: net/quic/chromium/quic_chromium_client_session.cc

Issue 2761053002: Fix the NetLog to add end event for QUIC_SESSION (Closed)
Patch Set: Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/chromium/quic_chromium_client_session.h" 5 #include "net/quic/chromium/quic_chromium_client_session.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 if (socket && socket->GetLocalAddress(&address) == OK && 291 if (socket && socket->GetLocalAddress(&address) == OK &&
292 address.GetFamily() == ADDRESS_FAMILY_IPV6) { 292 address.GetFamily() == ADDRESS_FAMILY_IPV6) {
293 connection->SetMaxPacketLength(connection->max_packet_length() - 293 connection->SetMaxPacketLength(connection->max_packet_length() -
294 kAdditionalOverheadForIPv6); 294 kAdditionalOverheadForIPv6);
295 } 295 }
296 connect_timing_.dns_start = dns_resolution_start_time; 296 connect_timing_.dns_start = dns_resolution_start_time;
297 connect_timing_.dns_end = dns_resolution_end_time; 297 connect_timing_.dns_end = dns_resolution_end_time;
298 } 298 }
299 299
300 QuicChromiumClientSession::~QuicChromiumClientSession() { 300 QuicChromiumClientSession::~QuicChromiumClientSession() {
301 net_log_.EndEvent(NetLogEventType::QUIC_SESSION);
301 if (!dynamic_streams().empty()) 302 if (!dynamic_streams().empty())
302 RecordUnexpectedOpenStreams(DESTRUCTOR); 303 RecordUnexpectedOpenStreams(DESTRUCTOR);
303 if (!observers_.empty()) 304 if (!observers_.empty())
304 RecordUnexpectedObservers(DESTRUCTOR); 305 RecordUnexpectedObservers(DESTRUCTOR);
305 if (!going_away_) 306 if (!going_away_)
306 RecordUnexpectedNotGoingAway(DESTRUCTOR); 307 RecordUnexpectedNotGoingAway(DESTRUCTOR);
307 308
308 while (!dynamic_streams().empty() || !observers_.empty() || 309 while (!dynamic_streams().empty() || !observers_.empty() ||
309 !stream_requests_.empty()) { 310 !stream_requests_.empty()) {
310 // The session must be closed before it is destroyed. 311 // The session must be closed before it is destroyed.
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 } 420 }
420 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.MaxReorderingTime", reordering, 421 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.MaxReorderingTime", reordering,
421 1, kMaxReordering, 50); 422 1, kMaxReordering, 50);
422 if (stats.min_rtt_us > 100 * 1000) { 423 if (stats.min_rtt_us > 100 * 1000) {
423 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.MaxReorderingTimeLongRtt", 424 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.MaxReorderingTimeLongRtt",
424 reordering, 1, kMaxReordering, 50); 425 reordering, 1, kMaxReordering, 50);
425 } 426 }
426 UMA_HISTOGRAM_COUNTS( 427 UMA_HISTOGRAM_COUNTS(
427 "Net.QuicSession.MaxReordering", 428 "Net.QuicSession.MaxReordering",
428 static_cast<base::HistogramBase::Sample>(stats.max_sequence_reordering)); 429 static_cast<base::HistogramBase::Sample>(stats.max_sequence_reordering));
429 net_log_.EndEvent(NetLogEventType::QUIC_SESSION);
430 } 430 }
431 431
432 void QuicChromiumClientSession::Initialize() { 432 void QuicChromiumClientSession::Initialize() {
433 QuicClientSessionBase::Initialize(); 433 QuicClientSessionBase::Initialize();
434 SetHpackEncoderDebugVisitor( 434 SetHpackEncoderDebugVisitor(
435 base::MakeUnique<HpackEncoderDebugVisitor>()); 435 base::MakeUnique<HpackEncoderDebugVisitor>());
436 SetHpackDecoderDebugVisitor( 436 SetHpackDecoderDebugVisitor(
437 base::MakeUnique<HpackDecoderDebugVisitor>()); 437 base::MakeUnique<HpackDecoderDebugVisitor>());
438 } 438 }
439 439
(...skipping 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after
1520 } 1520 }
1521 1521
1522 size_t QuicChromiumClientSession::EstimateMemoryUsage() const { 1522 size_t QuicChromiumClientSession::EstimateMemoryUsage() const {
1523 // TODO(xunjieli): Estimate |crypto_stream_|, QuicSpdySession's 1523 // TODO(xunjieli): Estimate |crypto_stream_|, QuicSpdySession's
1524 // QuicHeaderList, QuicSession's QuiCWriteBlockedList, open streams and 1524 // QuicHeaderList, QuicSession's QuiCWriteBlockedList, open streams and
1525 // unacked packet map. 1525 // unacked packet map.
1526 return base::trace_event::EstimateMemoryUsage(packet_readers_); 1526 return base::trace_event::EstimateMemoryUsage(packet_readers_);
1527 } 1527 }
1528 1528
1529 } // namespace net 1529 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698