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

Add net log support for IETF QUIC 0-RTT.

Change-Id: I661490736205537e9389cd5f7c1d029faff6f29e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2357132
Commit-Queue: Renjie Tang <renjietang@chromium.org>
Auto-Submit: Renjie Tang <renjietang@chromium.org>
Reviewed-by: default avatarDavid Schinazi <dschinazi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#798364}
parent 38c31d1c
...@@ -2030,6 +2030,13 @@ EVENT_TYPE(QUIC_SESSION_TRANSPORT_PARAMETERS_RECEIVED) ...@@ -2030,6 +2030,13 @@ EVENT_TYPE(QUIC_SESSION_TRANSPORT_PARAMETERS_RECEIVED)
// } // }
EVENT_TYPE(QUIC_SESSION_TRANSPORT_PARAMETERS_SENT) EVENT_TYPE(QUIC_SESSION_TRANSPORT_PARAMETERS_SENT)
// A QUIC connection resumed transport parameters for 0-RTT.
// {
// "quic_transport_parameters": <Human readable view of the transport
// parameters>
// }
EVENT_TYPE(QUIC_SESSION_TRANSPORT_PARAMETERS_RESUMED)
// 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:
// { // {
...@@ -3763,6 +3770,11 @@ EVENT_TYPE(HTTP3_UNKNOWN_FRAME_RECEIVED) ...@@ -3763,6 +3770,11 @@ EVENT_TYPE(HTTP3_UNKNOWN_FRAME_RECEIVED)
// <setting identifier>: <setting value> // <setting identifier>: <setting value>
EVENT_TYPE(HTTP3_SETTINGS_SENT) EVENT_TYPE(HTTP3_SETTINGS_SENT)
// Event emitted when an HTTP/3 SETTINGS frame is resumed for 0-RTT.
// A list of settings will be logged by
// <setting identifier>: <setting value>
EVENT_TYPE(HTTP3_SETTINGS_RESUMED)
// Event emitted when an HTTP/3 GOAWAY frame is sent. // Event emitted when an HTTP/3 GOAWAY frame is sent.
// { // {
// "stream_id": <The stream_id field of the GOAWAY frame> // "stream_id": <The stream_id field of the GOAWAY frame>
......
...@@ -582,6 +582,11 @@ void QuicConnectionLogger::OnTransportParametersReceived( ...@@ -582,6 +582,11 @@ void QuicConnectionLogger::OnTransportParametersReceived(
event_logger_.OnTransportParametersReceived(transport_parameters); event_logger_.OnTransportParametersReceived(transport_parameters);
} }
void QuicConnectionLogger::OnTransportParametersResumed(
const quic::TransportParameters& transport_parameters) {
event_logger_.OnTransportParametersResumed(transport_parameters);
}
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
......
...@@ -113,6 +113,8 @@ class NET_EXPORT_PRIVATE QuicConnectionLogger ...@@ -113,6 +113,8 @@ class NET_EXPORT_PRIVATE QuicConnectionLogger
const quic::TransportParameters& transport_parameters) override; const quic::TransportParameters& transport_parameters) override;
void OnTransportParametersReceived( void OnTransportParametersReceived(
const quic::TransportParameters& transport_parameters) override; const quic::TransportParameters& transport_parameters) override;
void OnTransportParametersResumed(
const quic::TransportParameters& transport_parameters) override;
void OnCryptoHandshakeMessageReceived( void OnCryptoHandshakeMessageReceived(
const quic::CryptoHandshakeMessage& message); const quic::CryptoHandshakeMessage& message);
......
...@@ -858,4 +858,14 @@ void QuicEventLogger::OnTransportParametersReceived( ...@@ -858,4 +858,14 @@ void QuicEventLogger::OnTransportParametersReceived(
}); });
} }
void QuicEventLogger::OnTransportParametersResumed(
const quic::TransportParameters& transport_parameters) {
if (!net_log_.IsCapturing())
return;
net_log_.AddEvent(
NetLogEventType::QUIC_SESSION_TRANSPORT_PARAMETERS_RESUMED, [&] {
return NetLogQuicTransportParametersParams(transport_parameters);
});
}
} // namespace net } // namespace net
...@@ -91,6 +91,8 @@ class NET_EXPORT_PRIVATE QuicEventLogger ...@@ -91,6 +91,8 @@ class NET_EXPORT_PRIVATE QuicEventLogger
const quic::TransportParameters& transport_parameters) override; const quic::TransportParameters& transport_parameters) override;
void OnTransportParametersReceived( void OnTransportParametersReceived(
const quic::TransportParameters& transport_parameters) override; const quic::TransportParameters& transport_parameters) override;
void OnTransportParametersResumed(
const quic::TransportParameters& transport_parameters) 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.
......
...@@ -313,6 +313,13 @@ void QuicHttp3Logger::OnSettingsFrameSent(const quic::SettingsFrame& frame) { ...@@ -313,6 +313,13 @@ void QuicHttp3Logger::OnSettingsFrameSent(const quic::SettingsFrame& frame) {
[&frame] { return NetLogSettingsParams(frame); }); [&frame] { return NetLogSettingsParams(frame); });
} }
void QuicHttp3Logger::OnSettingsFrameResumed(const quic::SettingsFrame& frame) {
if (!net_log_.IsCapturing())
return;
net_log_.AddEvent(NetLogEventType::HTTP3_SETTINGS_RESUMED,
[&frame] { return NetLogSettingsParams(frame); });
}
void QuicHttp3Logger::OnGoAwayFrameSent(quic::QuicStreamId stream_id) { void QuicHttp3Logger::OnGoAwayFrameSent(quic::QuicStreamId stream_id) {
if (!net_log_.IsCapturing()) { if (!net_log_.IsCapturing()) {
return; return;
......
...@@ -35,6 +35,7 @@ class NET_EXPORT_PRIVATE QuicHttp3Logger : public quic::Http3DebugVisitor { ...@@ -35,6 +35,7 @@ class NET_EXPORT_PRIVATE QuicHttp3Logger : public quic::Http3DebugVisitor {
void OnCancelPushFrameReceived(const quic::CancelPushFrame& frame) override; void OnCancelPushFrameReceived(const quic::CancelPushFrame& frame) override;
void OnSettingsFrameReceived(const quic::SettingsFrame& frame) override; void OnSettingsFrameReceived(const quic::SettingsFrame& frame) override;
void OnSettingsFrameResumed(const quic::SettingsFrame& frame) override;
void OnGoAwayFrameReceived(const quic::GoAwayFrame& frame) override; void OnGoAwayFrameReceived(const quic::GoAwayFrame& frame) override;
void OnMaxPushIdFrameReceived(const quic::MaxPushIdFrame& frame) override; void OnMaxPushIdFrameReceived(const quic::MaxPushIdFrame& frame) override;
void OnPriorityUpdateFrameReceived( void OnPriorityUpdateFrameReceived(
......
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