add tracing for sent and received packets

This commit is contained in:
Marten Seemann
2019-04-05 10:55:31 +09:00
parent 8926531f7e
commit 267d11ee66
12 changed files with 314 additions and 0 deletions

View File

@@ -670,3 +670,13 @@ func (h *sentPacketHandler) ResetForRetry() error {
h.updateLossDetectionAlarm()
return nil
}
func (h *sentPacketHandler) GetStats() *State {
return &State{
MinRTT: h.rttStats.MinRTT(),
SmoothedRTT: h.rttStats.SmoothedOrInitialRTT(),
LatestRTT: h.rttStats.LatestRTT(),
BytesInFlight: h.bytesInFlight,
CongestionWindow: h.congestion.GetCongestionWindow(),
}
}