epsilon_decay_test.go 193 B

123456789101112
  1. package hostpool
  2. import (
  3. "github.com/bmizerany/assert"
  4. "testing"
  5. )
  6. func TestEDS(t *testing.T) {
  7. eds := newDecayStore()
  8. eds.Record(1.5)
  9. assert.Equal(t, eds.GetWeightedAvgScore(), 1.5)
  10. }