Selaa lähdekoodia

fixing typo in sample that was causing panics

Matthew Kanwisher 12 vuotta sitten
vanhempi
commit
0bf9dc6e29
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      sample.go

+ 1 - 1
sample.go

@@ -87,7 +87,7 @@ func (s *ExpDecaySample) Update(v int64) {
 		s.t1 = s.t0.Add(rescaleThreshold)
 		for _, v := range values {
 			v.k = v.k * math.Exp(-s.alpha*float64(s.t0.Sub(t0)))
-			heap.Push(&values, v)
+			heap.Push(&s.values, v)
 		}
 	}
 }