mirror of
https://github.com/livekit/livekit.git
synced 2026-08-29 07:39:09 +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:
@@ -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