1 2 3 4 5 6 7 8 9 10 11 12 13 14
package quantile import ( "testing" ) func BenchmarkInsert(b *testing.B) { b.StopTimer() s := NewTargeted(0.01, 0.5, 0.9, 0.99) b.StartTimer() for i := float64(0); i < float64(b.N); i++ { s.Insert(i) } }