package metrics import "testing" func BenchmarkGuage(b *testing.B) { g := NewGauge() b.ResetTimer() for i := 0; i < b.N; i++ { g.Update(int64(i)) } } func TestGauge(t *testing.T) { g := NewGauge() g.Update(int64(47)) if v := g.Value(); 47 != v { t.Errorf("g.Value(): 47 != %v\n", v) } }