Sfoglia il codice sorgente

update benchmark to work with new private api

Dan Frank 12 anni fa
parent
commit
3b501aa84a
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      hostpool_test.go

+ 3 - 1
hostpool_test.go

@@ -141,7 +141,9 @@ func BenchmarkEpsilonGreedy(b *testing.B) {
 	b.StartTimer()
 	for i := 0; i < b.N; i++ {
 		if i != 0 && i%100 == 0 {
-			p.performEpsilonGreedyDecay()
+			for _, h := range p.hosts {
+				h.performDecay()
+			}
 		}
 		hostR := p.Get()
 		p.timer = &mockTimer{t: int(timings[i])}