mirror of
https://github.com/livekit/livekit.git
synced 2026-10-22 19:43:01 +00:00
Log time when there are too many packets. (#2127)
Ideally, can remove the nil return when there are too many packets as we have more information with extended sequence numbers, but logging duration first to understand what is happening better.
This commit is contained in:
1 parent
6c49d1a160
commit
5aa093f65d
2 files changed
+14
-4
No files matched your search
@@ -531,8 +531,13 @@ func (r *rtpStatsBase) deltaInfo(snapshotID uint32, extStartSN uint64, extHighes
|
||||
packetsExpected := now.extStartSN - then.extStartSN
|
||||
if packetsExpected > cNumSequenceNumbers {
|
||||
r.logger.Errorw(
|
||||
"too many packets expected in delta",
|
||||
fmt.Errorf("start: %d, end: %d, expected: %d", then.extStartSN, now.extStartSN, packetsExpected),
|
||||
"too many packets expected in delta", nil,
|
||||
"startSN", then.extStartSN,
|
||||
"endSN", now.extStartSN,
|
||||
"packetsExpected", packetsExpected,
|
||||
"startTime", startTime,
|
||||
"endTime", endTime,
|
||||
"duration", endTime.Sub(startTime),
|
||||
)
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -600,8 +600,13 @@ func (r *RTPStatsSender) DeltaInfoSender(senderSnapshotID uint32) *RTPDeltaInfo
|
||||
packetsExpected := uint32(now.extStartSN - then.extStartSN)
|
||||
if packetsExpected > cNumSequenceNumbers {
|
||||
r.logger.Warnw(
|
||||
"too many packets expected in delta (sender)",
|
||||
fmt.Errorf("start: %d, end: %d, expected: %d", then.extStartSN, now.extStartSN, packetsExpected),
|
||||
"too many packets expected in delta (sender)", nil,
|
||||
"startSN", then.extStartSN,
|
||||
"endSN", now.extStartSN,
|
||||
"packetsExpected", packetsExpected,
|
||||
"startTime", startTime,
|
||||
"endTime", endTime,
|
||||
"duration", endTime.Sub(startTime),
|
||||
)
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user