logging / qlog: add support for DPLPMTUD (#4517)

* logging / qlog: add support for DPLPMTUD

* improve the MTU discovery integration test
This commit is contained in:
Marten Seemann
2024-05-14 17:37:54 +08:00
committed by GitHub
parent 056a332ac4
commit e41d1f9dd7
12 changed files with 157 additions and 11 deletions

View File

@@ -76,6 +76,9 @@ func NewConnectionTracer(w io.WriteCloser, p logging.Perspective, odcid protocol
LostPacket: func(encLevel protocol.EncryptionLevel, pn protocol.PacketNumber, lossReason logging.PacketLossReason) {
t.LostPacket(encLevel, pn, lossReason)
},
UpdatedMTU: func(mtu logging.ByteCount, done bool) {
t.UpdatedMTU(mtu, done)
},
UpdatedCongestionState: func(state logging.CongestionState) {
t.UpdatedCongestionState(state)
},
@@ -367,6 +370,10 @@ func (t *connectionTracer) LostPacket(encLevel protocol.EncryptionLevel, pn prot
})
}
func (t *connectionTracer) UpdatedMTU(mtu protocol.ByteCount, done bool) {
t.recordEvent(time.Now(), &eventMTUUpdated{mtu: mtu, done: done})
}
func (t *connectionTracer) UpdatedCongestionState(state logging.CongestionState) {
t.recordEvent(time.Now(), &eventCongestionStateUpdated{state: congestionState(state)})
}