reg/vendor/github.com/beorn7/perks/histogram/bench_test.go
Jess Frazelle ab6c553e6b
update deps
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
2018-03-06 10:41:43 -05:00

27 lines
378 B
Go

package histogram
import (
"math/rand"
"testing"
)
func BenchmarkInsert10Bins(b *testing.B) {
b.StopTimer()
h := New(10)
b.StartTimer()
for i := 0; i < b.N; i++ {
f := rand.ExpFloat64()
h.Insert(f)
}
}
func BenchmarkInsert100Bins(b *testing.B) {
b.StopTimer()
h := New(100)
b.StartTimer()
for i := 0; i < b.N; i++ {
f := rand.ExpFloat64()
h.Insert(f)
}
}