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

Side by Side Diff: net/quic/quic_connection_logger.cc

Issue 2132623002: Landing Recent QUIC changes until 2016-07-02 02:45 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing comment about RPCs Created 4 years, 5 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 | « net/quic/quic_connection.cc ('k') | net/quic/quic_connection_test.cc » ('j') | 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/quic_connection_logger.h" 5 #include "net/quic/quic_connection_logger.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 net_log_.AddEvent( 456 net_log_.AddEvent(
457 NetLog::TYPE_QUIC_SESSION_PACKET_RETRANSMITTED, 457 NetLog::TYPE_QUIC_SESSION_PACKET_RETRANSMITTED,
458 base::Bind(&NetLogQuicPacketRetransmittedCallback, 458 base::Bind(&NetLogQuicPacketRetransmittedCallback,
459 original_packet_number, serialized_packet.packet_number)); 459 original_packet_number, serialized_packet.packet_number));
460 } 460 }
461 // Record time duration from last packet sent to the new packet sent. 461 // Record time duration from last packet sent to the new packet sent.
462 if (last_packet_sent_time_.IsInitialized()) { 462 if (last_packet_sent_time_.IsInitialized()) {
463 UMA_HISTOGRAM_CUSTOM_TIMES( 463 UMA_HISTOGRAM_CUSTOM_TIMES(
464 "Net.QuicTimeBetweenTwoPacketSent", 464 "Net.QuicTimeBetweenTwoPacketSent",
465 base::TimeDelta::FromMilliseconds( 465 base::TimeDelta::FromMilliseconds(
466 sent_time.Subtract(last_packet_sent_time_).ToMilliseconds()), 466 (sent_time - last_packet_sent_time_).ToMilliseconds()),
467 base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(10), 467 base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(10),
468 100); 468 100);
469 } 469 }
470 last_packet_sent_time_ = sent_time; 470 last_packet_sent_time_ = sent_time;
471 } 471 }
472 472
473 void QuicConnectionLogger::OnPacketReceived(const IPEndPoint& self_address, 473 void QuicConnectionLogger::OnPacketReceived(const IPEndPoint& self_address,
474 const IPEndPoint& peer_address, 474 const IPEndPoint& peer_address,
475 const QuicEncryptedPacket& packet) { 475 const QuicEncryptedPacket& packet) {
476 if (local_address_from_self_.GetFamily() == ADDRESS_FAMILY_UNSPECIFIED) { 476 if (local_address_from_self_.GetFamily() == ADDRESS_FAMILY_UNSPECIFIED) {
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
889 continue; 889 continue;
890 } 890 }
891 // Record some overlapping patterns, to get a better picture, since this is 891 // Record some overlapping patterns, to get a better picture, since this is
892 // not very expensive. 892 // not very expensive.
893 if (i % 3 == 0) 893 if (i % 3 == 0)
894 six_packet_histogram->Add(recent_6_mask); 894 six_packet_histogram->Add(recent_6_mask);
895 } 895 }
896 } 896 }
897 897
898 } // namespace net 898 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection.cc ('k') | net/quic/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698