mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-03 20:27:35 +03:00
log the size of buffered packets (#3571)
This commit is contained in:
parent
438942b888
commit
fe277dc663
11 changed files with 28 additions and 21 deletions
|
@ -126,7 +126,7 @@ type ConnectionTracer interface {
|
|||
ReceivedRetry(*Header)
|
||||
ReceivedLongHeaderPacket(hdr *ExtendedHeader, size ByteCount, frames []Frame)
|
||||
ReceivedShortHeaderPacket(hdr *ShortHeader, size ByteCount, frames []Frame)
|
||||
BufferedPacket(PacketType)
|
||||
BufferedPacket(PacketType, ByteCount)
|
||||
DroppedPacket(PacketType, ByteCount, PacketDropReason)
|
||||
UpdatedMetrics(rttStats *RTTStats, cwnd, bytesInFlight ByteCount, packetsInFlight int)
|
||||
AcknowledgedPacket(EncryptionLevel, PacketNumber)
|
||||
|
|
|
@ -51,15 +51,15 @@ func (mr *MockConnectionTracerMockRecorder) AcknowledgedPacket(arg0, arg1 interf
|
|||
}
|
||||
|
||||
// BufferedPacket mocks base method.
|
||||
func (m *MockConnectionTracer) BufferedPacket(arg0 PacketType) {
|
||||
func (m *MockConnectionTracer) BufferedPacket(arg0 PacketType, arg1 protocol.ByteCount) {
|
||||
m.ctrl.T.Helper()
|
||||
m.ctrl.Call(m, "BufferedPacket", arg0)
|
||||
m.ctrl.Call(m, "BufferedPacket", arg0, arg1)
|
||||
}
|
||||
|
||||
// BufferedPacket indicates an expected call of BufferedPacket.
|
||||
func (mr *MockConnectionTracerMockRecorder) BufferedPacket(arg0 interface{}) *gomock.Call {
|
||||
func (mr *MockConnectionTracerMockRecorder) BufferedPacket(arg0, arg1 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BufferedPacket", reflect.TypeOf((*MockConnectionTracer)(nil).BufferedPacket), arg0)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BufferedPacket", reflect.TypeOf((*MockConnectionTracer)(nil).BufferedPacket), arg0, arg1)
|
||||
}
|
||||
|
||||
// Close mocks base method.
|
||||
|
|
|
@ -134,9 +134,9 @@ func (m *connTracerMultiplexer) ReceivedShortHeaderPacket(hdr *ShortHeader, size
|
|||
}
|
||||
}
|
||||
|
||||
func (m *connTracerMultiplexer) BufferedPacket(typ PacketType) {
|
||||
func (m *connTracerMultiplexer) BufferedPacket(typ PacketType, size ByteCount) {
|
||||
for _, t := range m.tracers {
|
||||
t.BufferedPacket(typ)
|
||||
t.BufferedPacket(typ, size)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -198,9 +198,9 @@ var _ = Describe("Tracing", func() {
|
|||
})
|
||||
|
||||
It("traces the BufferedPacket event", func() {
|
||||
tr1.EXPECT().BufferedPacket(PacketTypeHandshake)
|
||||
tr2.EXPECT().BufferedPacket(PacketTypeHandshake)
|
||||
tracer.BufferedPacket(PacketTypeHandshake)
|
||||
tr1.EXPECT().BufferedPacket(PacketTypeHandshake, ByteCount(1337))
|
||||
tr2.EXPECT().BufferedPacket(PacketTypeHandshake, ByteCount(1337))
|
||||
tracer.BufferedPacket(PacketTypeHandshake, 1337)
|
||||
})
|
||||
|
||||
It("traces the DroppedPacket event", func() {
|
||||
|
|
|
@ -41,7 +41,7 @@ func (n NullConnectionTracer) ReceivedVersionNegotiationPacket(dest, src Arbitra
|
|||
func (n NullConnectionTracer) ReceivedRetry(*Header) {}
|
||||
func (n NullConnectionTracer) ReceivedLongHeaderPacket(*ExtendedHeader, ByteCount, []Frame) {}
|
||||
func (n NullConnectionTracer) ReceivedShortHeaderPacket(*ShortHeader, ByteCount, []Frame) {}
|
||||
func (n NullConnectionTracer) BufferedPacket(PacketType) {}
|
||||
func (n NullConnectionTracer) BufferedPacket(PacketType, ByteCount) {}
|
||||
func (n NullConnectionTracer) DroppedPacket(PacketType, ByteCount, PacketDropReason) {}
|
||||
|
||||
func (n NullConnectionTracer) UpdatedMetrics(rttStats *RTTStats, cwnd, bytesInFlight ByteCount, packetsInFlight int) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue