Logging more to understand layer transition leak better. (#1840)

This commit is contained in:
Raja Subramanian
2023-06-30 11:59:53 +05:30
committed by GitHub
parent 69a1e572be
commit 496656627e
2 changed files with 30 additions and 2 deletions
+5
View File
@@ -252,6 +252,8 @@ func (q *qualityScorer) AddLayerTransition(distance float64, at time.Time) {
q.lock.Lock()
defer q.lock.Unlock()
// TODO-REMOVE-AFTER-DEBUG
q.params.Logger.Debugw("adding layer transition", "at", at, "distance", distance)
q.layerTransitions = append(q.layerTransitions, layerTransition{
startedAt: at,
distance: distance,
@@ -262,6 +264,9 @@ func (q *qualityScorer) Update(stat *windowStat, at time.Time) {
q.lock.Lock()
defer q.lock.Unlock()
// TODO-REMOVE-AFTER-DEBUG
q.params.Logger.Debugw("running update", "at", at, "stat", stat)
// always update transitions
expectedBitrate := q.getExpectedBitsAndUpdateTransitions(at)
expectedDistance := q.getExpectedDistanceAndUpdateTransitions(at)