Cleaning up unused stream allocator experiments. (#3237)

Not sure if we will ever use it. Can bring it back if needed.
This commit is contained in:
Raja Subramanian
2024-12-08 13:00:58 +05:30
committed by GitHub
parent 7c5a558a48
commit c172ba13e6
10 changed files with 54 additions and 647 deletions
@@ -167,12 +167,6 @@ func (c *channelObserver) GetNackRatio() float64 {
return c.nackTracker.GetRatio()
}
/* REMOTE-BWE-DATA
func (c *channelObserver) GetNackHistory() []string {
return c.nackTracker.GetHistory()
}
*/
func (c *channelObserver) GetTrend() (channelTrend, channelCongestionReason) {
estimateDirection := c.estimateTrend.GetDirection()
-22
View File
@@ -58,24 +58,16 @@ type nackTracker struct {
windowStartTime time.Time
packets uint32
repeatedNacks uint32
/* REMOTE-BWE-DATA
// REMOTE-BWE-EXPERIMENTAL-TODO: remove when cleaning up experimental stuff
history []string
*/
}
func newNackTracker(params nackTrackerParams) *nackTracker {
return &nackTracker{
params: params,
// REMOTE-BWE-DATA history: make([]string, 0, 10),
}
}
func (n *nackTracker) Add(packets uint32, repeatedNacks uint32) {
if n.params.Config.WindowMaxDuration != 0 && !n.windowStartTime.IsZero() && time.Since(n.windowStartTime) > n.params.Config.WindowMaxDuration {
// REMOTE-BWE-DATA n.updateHistory()
n.windowStartTime = time.Time{}
n.packets = 0
n.repeatedNacks = 0
@@ -135,18 +127,4 @@ func (n *nackTracker) MarshalLogObject(e zapcore.ObjectEncoder) error {
return nil
}
/* REMOTE-BWE-DATA
func (n *nackTracker) GetHistory() []string {
return n.history
}
func (n *nackTracker) updateHistory() {
if len(n.history) >= 10 {
n.history = n.history[1:]
}
n.history = append(n.history, n.String())
}
*/
// ------------------------------------------------
-7
View File
@@ -229,13 +229,6 @@ func (r *RemoteBWE) estimateAvailableChannelCapacity(reason channelCongestionRea
}
ulgr.Infow("remote bwe: channel congestion detected, applying channel capacity update")
/* REMOTE-BWE-DATA
r.params.Logger.Debugw(
fmt.Sprintf("remote bwe: channel congestion detected, %s channel capacity: experimental", action),
"nackHistory", r.channelObserver.GetNackHistory(),
)
*/
r.committedChannelCapacity = estimateToCommit
// reset to get new set of samples for next trend