mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-01-19 03:00:29 +01:00
Revert "regression: fix ewma warmup again (#2079)"
This reverts commit f67e9cab32
.
This commit is contained in:
parent
f67e9cab32
commit
66f019d886
@ -3,7 +3,7 @@ package main
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"github.com/jedisct1/ewma"
|
||||
"github.com/lifenjoiner/ewma"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -13,7 +13,7 @@ const (
|
||||
type QuestionSizeEstimator struct {
|
||||
sync.RWMutex
|
||||
minQuestionSize int
|
||||
ewma ewma.MovingAverage
|
||||
ewma *ewma.EWMA
|
||||
}
|
||||
|
||||
func NewQuestionSizeEstimator() QuestionSizeEstimator {
|
||||
|
@ -16,9 +16,9 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/jedisct1/dlog"
|
||||
"github.com/jedisct1/ewma"
|
||||
clocksmith "github.com/jedisct1/go-clocksmith"
|
||||
stamps "github.com/jedisct1/go-dnsstamps"
|
||||
"github.com/lifenjoiner/ewma"
|
||||
"github.com/miekg/dns"
|
||||
"golang.org/x/crypto/ed25519"
|
||||
)
|
||||
@ -46,7 +46,7 @@ type DOHClientCreds struct {
|
||||
type ServerInfo struct {
|
||||
DOHClientCreds DOHClientCreds
|
||||
lastActionTS time.Time
|
||||
rtt ewma.MovingAverage
|
||||
rtt *ewma.EWMA
|
||||
Name string
|
||||
HostName string
|
||||
UDPAddr *net.UDPAddr
|
||||
@ -199,7 +199,6 @@ 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()
|
||||
|
2
go.mod
2
go.mod
@ -10,7 +10,6 @@ require (
|
||||
github.com/hashicorp/golang-lru v0.5.4
|
||||
github.com/hectane/go-acl v0.0.0-20190604041725-da78bae5fc95
|
||||
github.com/jedisct1/dlog v0.0.0-20210927135244-3381aa132e7f
|
||||
github.com/jedisct1/ewma v1.2.1-0.20220220223311-a30af446ecb9
|
||||
github.com/jedisct1/go-clocksmith v0.0.0-20210101121932-da382b963868
|
||||
github.com/jedisct1/go-dnsstamps v0.0.0-20220328103132-6fb2da762370
|
||||
github.com/jedisct1/go-hpke-compact v0.0.0-20210930135406-0763750339f0
|
||||
@ -18,6 +17,7 @@ require (
|
||||
github.com/jedisct1/xsecretbox v0.0.0-20210927135450-ebe41aef7bef
|
||||
github.com/k-sone/critbitgo v1.4.0
|
||||
github.com/kardianos/service v1.2.1
|
||||
github.com/lifenjoiner/ewma v0.0.0-20210320054258-4f227d7eb8a2
|
||||
github.com/miekg/dns v1.1.47
|
||||
github.com/powerman/check v1.6.0
|
||||
golang.org/x/crypto v0.0.0-20220321153916-2c7772ba3064
|
||||
|
4
go.sum
4
go.sum
@ -350,8 +350,6 @@ github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NH
|
||||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
||||
github.com/jedisct1/dlog v0.0.0-20210927135244-3381aa132e7f h1:XICcphytniQKdtd4FGrK0b1ERzS7FBvFtVUCReSppmU=
|
||||
github.com/jedisct1/dlog v0.0.0-20210927135244-3381aa132e7f/go.mod h1:35aII3PkLMvmc8daWy0vcZXDU+a40lJczHHTFRJmnvw=
|
||||
github.com/jedisct1/ewma v1.2.1-0.20220220223311-a30af446ecb9 h1:U5QPCoM1KkMJ9RfEfP0joKNwwwIHG1oP9RzjvQTuh98=
|
||||
github.com/jedisct1/ewma v1.2.1-0.20220220223311-a30af446ecb9/go.mod h1:qCWdft6DX9wxyNsUS+sxS44UkxE7eQnNtBttTWoW0cU=
|
||||
github.com/jedisct1/go-clocksmith v0.0.0-20210101121932-da382b963868 h1:QZ79mRbNwYYYmiVjyv+X0NKgYE6nyN1yo3gtEFdzpiE=
|
||||
github.com/jedisct1/go-clocksmith v0.0.0-20210101121932-da382b963868/go.mod h1:SAINchklztk2jcLWJ4bpNF4KnwDUSUTX+cJbspWC2Rw=
|
||||
github.com/jedisct1/go-dnsstamps v0.0.0-20220328103132-6fb2da762370 h1:VQyy4FYgkGVvMnfMauP3phjlwmQQu+DxnE5jBBH4It8=
|
||||
@ -423,6 +421,8 @@ github.com/letsencrypt/pkcs11key/v4 v4.0.0/go.mod h1:EFUvBDay26dErnNb70Nd0/VW3tJ
|
||||
github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
||||
github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
||||
github.com/lib/pq v1.9.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
||||
github.com/lifenjoiner/ewma v0.0.0-20210320054258-4f227d7eb8a2 h1:eD3+F7WMC7wryFGBrLSyzoRqK+kR7nCT/9VT2E3XJzc=
|
||||
github.com/lifenjoiner/ewma v0.0.0-20210320054258-4f227d7eb8a2/go.mod h1:SJvYtJnDKXqTrIvyRocCJmuNuM3bUb4krn9UbZXj+tw=
|
||||
github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4=
|
||||
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
|
||||
github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4=
|
||||
|
6
vendor/modules.txt
vendored
6
vendor/modules.txt
vendored
@ -248,9 +248,6 @@ github.com/inconshreveable/mousetrap
|
||||
# github.com/jedisct1/dlog v0.0.0-20210927135244-3381aa132e7f
|
||||
## explicit; go 1.17
|
||||
github.com/jedisct1/dlog
|
||||
# github.com/jedisct1/ewma v1.2.1-0.20220220223311-a30af446ecb9
|
||||
## explicit; go 1.12
|
||||
github.com/jedisct1/ewma
|
||||
# github.com/jedisct1/go-clocksmith v0.0.0-20210101121932-da382b963868
|
||||
## explicit
|
||||
github.com/jedisct1/go-clocksmith
|
||||
@ -306,6 +303,9 @@ github.com/ldez/gomoddirectives
|
||||
# github.com/ldez/tagliatelle v0.2.0
|
||||
## explicit; go 1.16
|
||||
github.com/ldez/tagliatelle
|
||||
# github.com/lifenjoiner/ewma v0.0.0-20210320054258-4f227d7eb8a2
|
||||
## explicit; go 1.16
|
||||
github.com/lifenjoiner/ewma
|
||||
# github.com/magiconair/properties v1.8.1
|
||||
## explicit
|
||||
github.com/magiconair/properties
|
||||
|
Loading…
Reference in New Issue
Block a user