uquic/internal/utils/ringbuffer/ringbuffer_bench_test.go
Glonee f1f42d8d90
use a ring buffer in the framer (#3857)
* implement and use ringbuffer in framer

* Add comments for ring buffer

Co-authored-by: Marten Seemann <martenseemann@gmail.com>

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2023-06-01 11:53:37 -07:00

12 lines
183 B
Go

package ringbuffer
import "testing"
func BenchmarkRingBuffer(b *testing.B) {
r := RingBuffer[int]{}
b.ResetTimer()
for i := 0; i < b.N; i++ {
r.PushBack(i)
r.PopFront()
}
}