github.com/quic-go/quic-go@v0.44.0/internal/utils/ringbuffer/ringbuffer_bench_test.go (about) 1 package ringbuffer 2 3 import "testing" 4 5 func BenchmarkRingBuffer(b *testing.B) { 6 r := RingBuffer[int]{} 7 b.ResetTimer() 8 for i := 0; i < b.N; i++ { 9 r.PushBack(i) 10 r.PopFront() 11 } 12 }