1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-28 06:42:00 +03:00

Fix build

This commit is contained in:
Vladimir Mihailenco
2020-09-11 12:46:38 +03:00
parent 83d698027f
commit 46e04ce67e
2 changed files with 171 additions and 171 deletions

View File

@ -192,11 +192,11 @@ func (n *clusterNode) updateLatency() {
var dur uint64
for i := 0; i < numProbe; i++ {
time.Sleep(time.Duration(10+rand.Intn(10)) * time.Millisecond)
start := time.Now()
n.Client.Ping(context.TODO())
dur += uint64(time.Since(start) / time.Microsecond)
time.Sleep(time.Duration(10+rand.Intn(10)) * time.Millisecond)
}
latency := float64(dur) / float64(numProbe)