Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Less UMA histograms from QuicConnectionLogger #4493

Open
wants to merge 1 commit into
base: 25.lts.1+
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions net/quic/quic_connection_logger.cc
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ void QuicConnectionLogger::OnPacketSent(
const quic::QuicFrames& retransmittable_frames,
const quic::QuicFrames& nonretransmittable_frames,
quic::QuicTime sent_time) {
#if !defined(STARBOARD)
// 4.4.1.4. Minimum Packet Size
// The payload of a UDP datagram carrying the Initial packet MUST be
// expanded to at least 1200 octets
Expand Down Expand Up @@ -211,6 +212,7 @@ void QuicConnectionLogger::OnPacketSent(
NOTREACHED();
break;
}
#endif

event_logger_.OnPacketSent(packet_number, packet_length, has_crypto_handshake,
transmission_type, encryption_level,
Expand Down Expand Up @@ -241,13 +243,17 @@ void QuicConnectionLogger::OnPacketReceived(
const quic::QuicSocketAddress& self_address,
const quic::QuicSocketAddress& peer_address,
const quic::QuicEncryptedPacket& packet) {
#if !defined(STARBOARD)
// We disable the packet receiving histogram in Cobalt for performance
// reasons.
if (local_address_from_self_.GetFamily() == ADDRESS_FAMILY_UNSPECIFIED) {
local_address_from_self_ = ToIPEndPoint(self_address);
UMA_HISTOGRAM_ENUMERATION(
"Net.QuicSession.ConnectionTypeFromSelf",
GetRealAddressFamily(ToIPEndPoint(self_address).address()),
ADDRESS_FAMILY_LAST);
}
#endif

previous_received_packet_size_ = last_received_packet_size_;
last_received_packet_size_ = packet.length();
Expand Down Expand Up @@ -301,7 +307,10 @@ void QuicConnectionLogger::OnPacketHeader(const quic::QuicPacketHeader& header,
if (!largest_received_packet_number_.IsInitialized()) {
largest_received_packet_number_ = header.packet_number;
} else if (largest_received_packet_number_ < header.packet_number) {
#if !defined(STARBOARD)
uint64_t delta = header.packet_number - largest_received_packet_number_;
// We disable the packet header histograms in Cobalt for performance
// reasons.
if (delta > 1) {
// There is a gap between the largest packet previously received and
// the current packet. This indicates either loss, or out-of-order
Expand All @@ -310,8 +319,12 @@ void QuicConnectionLogger::OnPacketHeader(const quic::QuicPacketHeader& header,
"Net.QuicSession.PacketGapReceived",
static_cast<base::HistogramBase::Sample>(delta - 1));
}
#endif
largest_received_packet_number_ = header.packet_number;
}
#if !defined(STARBOARD)
// We disable the packet header histograms in Cobalt for performance
// reasons.
if (header.packet_number - first_received_packet_number_ <
received_packets_.size()) {
received_packets_[header.packet_number - first_received_packet_number_] =
Expand All @@ -335,6 +348,7 @@ void QuicConnectionLogger::OnPacketHeader(const quic::QuicPacketHeader& header,
}
no_packet_received_after_ping_ = false;
}
#endif
last_received_packet_number_ = header.packet_number;
event_logger_.OnPacketHeader(header, receive_time, level);
}
Expand Down
Loading