summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorzhongyi <zhongyi@chromium.org>2015-09-18 14:13:52 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-18 21:14:26 +0000
commitfda25c9686e6f189dff8beae9914fc8426442c5f (patch)
treea1d52e07da7c6d1a9490fa23e3db71d1ab5281f0 /net
parent5917a7699c458188643ab29c804a1db6633ca0fc (diff)
downloadchromium_src-fda25c9686e6f189dff8beae9914fc8426442c5f.zip
chromium_src-fda25c9686e6f189dff8beae9914fc8426442c5f.tar.gz
chromium_src-fda25c9686e6f189dff8beae9914fc8426442c5f.tar.bz2
QUIC - Add Histogram to measure time difference between two packet sent in quic_connection_logger.
R=rch@chromium.org, asvitkine@chromium.org Review URL: https://codereview.chromium.org/1348413003 Cr-Commit-Position: refs/heads/master@{#349771}
Diffstat (limited to 'net')
-rw-r--r--net/quic/quic_connection_logger.cc11
-rw-r--r--net/quic/quic_connection_logger.h2
2 files changed, 13 insertions, 0 deletions
diff --git a/net/quic/quic_connection_logger.cc b/net/quic/quic_connection_logger.cc
index 5c371c61..54b6cd4 100644
--- a/net/quic/quic_connection_logger.cc
+++ b/net/quic/quic_connection_logger.cc
@@ -292,6 +292,7 @@ QuicConnectionLogger::QuicConnectionLogger(
last_received_packet_number_(0),
last_received_packet_size_(0),
previous_received_packet_size_(0),
+ last_packet_sent_time_(base::TimeTicks()),
largest_received_packet_number_(0),
largest_received_missing_packet_number_(0),
num_out_of_order_received_packets_(0),
@@ -456,6 +457,16 @@ void QuicConnectionLogger::OnPacketSent(
base::Bind(&NetLogQuicPacketRetransmittedCallback,
original_packet_number, serialized_packet.packet_number));
}
+ // Record time duration from last packet sent to the new packet sent.
+ if (last_packet_sent_time_.IsInitialized()) {
+ UMA_HISTOGRAM_CUSTOM_TIMES(
+ "Net.QuicTimeBetweenTwoPacketSent",
+ base::TimeDelta::FromMilliseconds(
+ sent_time.Subtract(last_packet_sent_time_).ToMilliseconds()),
+ base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(10),
+ 100);
+ }
+ last_packet_sent_time_ = sent_time;
}
void QuicConnectionLogger::OnPacketReceived(const IPEndPoint& self_address,
diff --git a/net/quic/quic_connection_logger.h b/net/quic/quic_connection_logger.h
index 1d0e62f..55e0566 100644
--- a/net/quic/quic_connection_logger.h
+++ b/net/quic/quic_connection_logger.h
@@ -126,6 +126,8 @@ class NET_EXPORT_PRIVATE QuicConnectionLogger
size_t last_received_packet_size_;
// The size of the previously received packet.
size_t previous_received_packet_size_;
+ // The timestamp of last packet sent.
+ QuicTime last_packet_sent_time_;
// The largest packet number received. In the case where a packet is
// received late (out of order), this value will not be updated.
QuicPacketNumber largest_received_packet_number_;