Skip to content

Commit

Permalink
Less UMA histograms for packets
Browse files Browse the repository at this point in the history
  • Loading branch information
jellefoks committed Nov 14, 2024
1 parent fd13e36 commit f7d4717
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions net/quic/quic_connection_logger.cc
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ void QuicConnectionLogger::OnPacketSent(
const quic::QuicFrames& retransmittable_frames,
const quic::QuicFrames& nonretransmittable_frames,
quic::QuicTime sent_time) {
#if defined(STARBOARD)
return;
#else
// 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 @@ -216,6 +219,7 @@ void QuicConnectionLogger::OnPacketSent(
transmission_type, encryption_level,
retransmittable_frames, nonretransmittable_frames,
sent_time);
#endif
}

void QuicConnectionLogger::OnPacketLoss(
Expand All @@ -241,6 +245,9 @@ void QuicConnectionLogger::OnPacketReceived(
const quic::QuicSocketAddress& self_address,
const quic::QuicSocketAddress& peer_address,
const quic::QuicEncryptedPacket& packet) {
#if defined(STARBOARD)
return;
#else
if (local_address_from_self_.GetFamily() == ADDRESS_FAMILY_UNSPECIFIED) {
local_address_from_self_ = ToIPEndPoint(self_address);
UMA_HISTOGRAM_ENUMERATION(
Expand All @@ -252,6 +259,7 @@ void QuicConnectionLogger::OnPacketReceived(
previous_received_packet_size_ = last_received_packet_size_;
last_received_packet_size_ = packet.length();
event_logger_.OnPacketReceived(self_address, peer_address, packet);
#endif
}

void QuicConnectionLogger::OnUnauthenticatedHeader(
Expand Down Expand Up @@ -290,6 +298,9 @@ void QuicConnectionLogger::OnProtocolVersionMismatch(
void QuicConnectionLogger::OnPacketHeader(const quic::QuicPacketHeader& header,
quic::QuicTime receive_time,
quic::EncryptionLevel level) {
#if defined(STARBOARD)
return;
#else
if (!first_received_packet_number_.IsInitialized()) {
first_received_packet_number_ = header.packet_number;
} else if (header.packet_number < first_received_packet_number_) {
Expand Down Expand Up @@ -337,6 +348,7 @@ void QuicConnectionLogger::OnPacketHeader(const quic::QuicPacketHeader& header,
}
last_received_packet_number_ = header.packet_number;
event_logger_.OnPacketHeader(header, receive_time, level);
#endif
}

void QuicConnectionLogger::OnStreamFrame(const quic::QuicStreamFrame& frame) {
Expand Down

0 comments on commit f7d4717

Please sign in to comment.