blob: bc0d8dc197f3c21e82750d7520f02ce46ef976a2 [file] [log] [blame]
package disruptor
import "testing"
func BenchmarkWriterReserve(b *testing.B) {
iterations := int64(b.N)
written, read := NewCursor(), NewCursor()
writer := NewWriter(written, read, 1024*64)
b.ReportAllocs()
b.ResetTimer()
for i := int64(0); i < iterations; i++ {
writer.Reserve(i)
read.sequence = i
}
}