Skip to content

Commit

Permalink
Add parallel bench test for gauge_float64
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralph Caraveo committed Apr 5, 2018
1 parent c8b5fd4 commit 7f3de8a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions gauge_float64_test.go
Expand Up @@ -10,6 +10,16 @@ func BenchmarkGuageFloat64(b *testing.B) {
}
}

func BenchmarkGuageFloat64Parallel(b *testing.B) {
g := NewGaugeFloat64()
b.ResetTimer()
b.RunParallel(func(pb *testing.PB) {
for pb.Next() {
g.Update(float64(1))
}
})
}

func TestGaugeFloat64(t *testing.T) {
g := NewGaugeFloat64()
g.Update(float64(47.0))
Expand Down

0 comments on commit 7f3de8a

Please sign in to comment.