Set the number of warmup samples to 1 for the RTT estimator

This commit is contained in:
Frank Denis 2022-02-20 23:38:42 +01:00
parent 7956ba5b10
commit cb140673fa
1 changed files with 1 additions and 0 deletions

View File

@ -194,6 +194,7 @@ func (serversInfo *ServersInfo) refreshServer(proxy *Proxy, name string, stamp s
dlog.Fatalf("[%s] != [%s]", name, newServer.Name)
}
newServer.rtt = ewma.NewMovingAverage(RTTEwmaDecay)
newServer.rtt.SetWarmupSamples(1)
newServer.rtt.Set(float64(newServer.initialRtt))
isNew = true
serversInfo.Lock()