mirror of
https://github.com/livekit/livekit.git
synced 2026-10-22 15:22:30 +00:00
Correct reason for poor/lost score. (#3397)
No functional change, just logging reason was confusing. Also, log no packets case. Seeing some instances in staging where there are periods of no packets received. Trying to understand better.
This commit is contained in:
1 parent
2f758d49ce
commit
f45e3613ac
2 files changed
+9
-2
No files matched your search
@@ -408,10 +408,10 @@ func (q *qualityScorer) updateAtLocked(stat *windowStat, at time.Time) {
|
||||
var score, packetScore, bitrateScore, layerScore float64
|
||||
if stat.packets+stat.packetsPadding == 0 {
|
||||
if !stat.lastRTCPAt.IsZero() && at.Sub(stat.lastRTCPAt) > stat.duration {
|
||||
reason = "dry"
|
||||
reason = "rtcp"
|
||||
score = qualityTransitionScore[livekit.ConnectionQuality_LOST]
|
||||
} else {
|
||||
reason = "rtcp"
|
||||
reason = "dry"
|
||||
score = qualityTransitionScore[livekit.ConnectionQuality_POOR]
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -468,6 +468,13 @@ func (r *rtpStatsBase) deltaInfo(
|
||||
StartTime: time.Unix(0, startTime),
|
||||
EndTime: time.Unix(0, endTime),
|
||||
}
|
||||
loggingFields = []interface{}{
|
||||
"snapshotID", snapshotID,
|
||||
"snapshotNow", now,
|
||||
"snapshotThen", then,
|
||||
"duration", time.Duration(endTime - startTime),
|
||||
}
|
||||
err = errors.New("no packets in delta")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user