Commit c65111da authored by rch's avatar rch Committed by Commit bot

Net.QuicSession.OutOfOrderLargePacketsReceived

The number of times the current received packet had a lower sequence number
than the previously received packet sequence number, and the size of the
current packet is larger than the size of the previous packet.

Review URL: https://codereview.chromium.org/905593002

Cr-Commit-Position: refs/heads/master@{#315087}
parent ff331b65
......@@ -326,9 +326,11 @@ QuicConnectionLogger::QuicConnectionLogger(QuicSession* session,
session_(session),
last_received_packet_sequence_number_(0),
last_received_packet_size_(0),
previous_received_packet_size_(0),
largest_received_packet_sequence_number_(0),
largest_received_missing_packet_sequence_number_(0),
num_out_of_order_received_packets_(0),
num_out_of_order_large_received_packets_(0),
num_packets_received_(0),
num_truncated_acks_sent_(0),
num_truncated_acks_received_(0),
......@@ -345,6 +347,8 @@ QuicConnectionLogger::QuicConnectionLogger(QuicSession* session,
QuicConnectionLogger::~QuicConnectionLogger() {
UMA_HISTOGRAM_COUNTS("Net.QuicSession.OutOfOrderPacketsReceived",
num_out_of_order_received_packets_);
UMA_HISTOGRAM_COUNTS("Net.QuicSession.OutOfOrderLargePacketsReceived",
num_out_of_order_large_received_packets_);
UMA_HISTOGRAM_COUNTS("Net.QuicSession.TruncatedAcksSent",
num_truncated_acks_sent_);
UMA_HISTOGRAM_COUNTS("Net.QuicSession.TruncatedAcksReceived",
......@@ -496,6 +500,7 @@ void QuicConnectionLogger::OnPacketReceived(const IPEndPoint& self_address,
ADDRESS_FAMILY_LAST);
}
previous_received_packet_size_ = last_received_packet_size_;
last_received_packet_size_ = packet.length();
net_log_.AddEvent(
NetLog::TYPE_QUIC_SESSION_PACKET_RECEIVED,
......@@ -546,6 +551,8 @@ void QuicConnectionLogger::OnPacketHeader(const QuicPacketHeader& header) {
}
if (header.packet_sequence_number < last_received_packet_sequence_number_) {
++num_out_of_order_received_packets_;
if (previous_received_packet_size_ < last_received_packet_size_)
++num_out_of_order_large_received_packets_;
UMA_HISTOGRAM_COUNTS(
"Net.QuicSession.OutOfOrderGapReceived",
static_cast<base::HistogramBase::Sample>(
......
......@@ -118,6 +118,8 @@ class NET_EXPORT_PRIVATE QuicConnectionLogger
QuicPacketSequenceNumber last_received_packet_sequence_number_;
// The size of the most recently received packet.
size_t last_received_packet_size_;
// The size of the previously received packet.
size_t previous_received_packet_size_;
// The largest packet sequence number received. In the case where a packet is
// received late (out of order), this value will not be updated.
QuicPacketSequenceNumber largest_received_packet_sequence_number_;
......@@ -127,6 +129,11 @@ class NET_EXPORT_PRIVATE QuicConnectionLogger
// Number of times that the current received packet sequence number is
// smaller than the last received packet sequence number.
size_t num_out_of_order_received_packets_;
// Number of times that the current received packet sequence number is
// smaller than the last received packet sequence number and where the
// size of the current packet is larger than the size of the previous
// packet.
size_t num_out_of_order_large_received_packets_;
// The number of times that OnPacketHeader was called.
// If the network replicates packets, then this number may be slightly
// different from the real number of distinct packets received.
......
......@@ -18527,6 +18527,15 @@ Therefore, the affected-histogram name has to have at least one dot in it.
</summary>
</histogram>
<histogram name="Net.QuicSession.OutOfOrderLargePacketsReceived">
<owner>rch@chromium.org</owner>
<summary>
The number of times the current received packet had a lower sequence number
than the previously received packet sequence number, and the size of the
current packet is larger than the size of the previous packet.
</summary>
</histogram>
<histogram name="Net.QuicSession.OutOfOrderPacketsReceived">
<owner>rch@chromium.org</owner>
<summary>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment