Commit d4899790 authored by Renjie Tang's avatar Renjie Tang Committed by Commit Bot

Log 0-RTT rejection in net log.

Change-Id: I8a03f403342f90340224eddfaa12b04a47e9ff75
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2364955
Auto-Submit: Renjie Tang <renjietang@chromium.org>
Reviewed-by: default avatarDavid Schinazi <dschinazi@chromium.org>
Commit-Queue: Renjie Tang <renjietang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799962}
parent a2b67d62
...@@ -2037,6 +2037,9 @@ EVENT_TYPE(QUIC_SESSION_TRANSPORT_PARAMETERS_SENT) ...@@ -2037,6 +2037,9 @@ EVENT_TYPE(QUIC_SESSION_TRANSPORT_PARAMETERS_SENT)
// } // }
EVENT_TYPE(QUIC_SESSION_TRANSPORT_PARAMETERS_RESUMED) EVENT_TYPE(QUIC_SESSION_TRANSPORT_PARAMETERS_RESUMED)
// QUIC with TLS gets 0-RTT rejected.
EVENT_TYPE(QUIC_SESSION_ZERO_RTT_REJECTED)
// A QUIC connection received a PUSH_PROMISE frame. The following // A QUIC connection received a PUSH_PROMISE frame. The following
// parameters are attached: // parameters are attached:
// { // {
......
...@@ -589,6 +589,10 @@ void QuicConnectionLogger::OnTransportParametersResumed( ...@@ -589,6 +589,10 @@ void QuicConnectionLogger::OnTransportParametersResumed(
event_logger_.OnTransportParametersResumed(transport_parameters); event_logger_.OnTransportParametersResumed(transport_parameters);
} }
void QuicConnectionLogger::OnZeroRttRejected() {
event_logger_.OnZeroRttRejected();
}
void QuicConnectionLogger::RecordAggregatePacketLossRate() const { void QuicConnectionLogger::RecordAggregatePacketLossRate() const {
// For short connections under 22 packets in length, we'll rely on the // For short connections under 22 packets in length, we'll rely on the
// Net.QuicSession.21CumulativePacketsReceived_* histogram to indicate packet // Net.QuicSession.21CumulativePacketsReceived_* histogram to indicate packet
......
...@@ -129,6 +129,8 @@ class NET_EXPORT_PRIVATE QuicConnectionLogger ...@@ -129,6 +129,8 @@ class NET_EXPORT_PRIVATE QuicConnectionLogger
// Returns connection's overall packet loss rate in fraction. // Returns connection's overall packet loss rate in fraction.
float ReceivedPacketLossRate() const; float ReceivedPacketLossRate() const;
void OnZeroRttRejected() override;
private: private:
// Do a factory get for a histogram to record a 6-packet loss-sequence as a // Do a factory get for a histogram to record a 6-packet loss-sequence as a
// sample. The histogram will record the 64 distinct possible combinations. // sample. The histogram will record the 64 distinct possible combinations.
......
...@@ -870,4 +870,10 @@ void QuicEventLogger::OnTransportParametersResumed( ...@@ -870,4 +870,10 @@ void QuicEventLogger::OnTransportParametersResumed(
}); });
} }
void QuicEventLogger::OnZeroRttRejected() {
if (!net_log_.IsCapturing())
return;
net_log_.AddEvent(NetLogEventType::QUIC_SESSION_ZERO_RTT_REJECTED);
}
} // namespace net } // namespace net
...@@ -94,6 +94,7 @@ class NET_EXPORT_PRIVATE QuicEventLogger ...@@ -94,6 +94,7 @@ class NET_EXPORT_PRIVATE QuicEventLogger
const quic::TransportParameters& transport_parameters) override; const quic::TransportParameters& transport_parameters) override;
void OnTransportParametersResumed( void OnTransportParametersResumed(
const quic::TransportParameters& transport_parameters) override; const quic::TransportParameters& transport_parameters) override;
void OnZeroRttRejected() override;
// Events that are not received via the visitor and have to be called manually // Events that are not received via the visitor and have to be called manually
// from the session. // from the session.
......
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