mirror of
https://github.com/ceph/go-ceph
synced 2024-12-18 12:25:22 +00:00
1c719b199e
Signed-off-by: Sven Anderson <sven@redhat.com>
15 lines
236 B
Go
15 lines
236 B
Go
package cutil
|
|
|
|
import "testing"
|
|
|
|
func BenchmarkSyncBuffer(b *testing.B) {
|
|
data := make([]byte, 1024*64)
|
|
var p = Malloc(PtrSize)
|
|
defer Free(p)
|
|
for i := 0; i < b.N; i++ {
|
|
sb := NewSyncBuffer(p, data)
|
|
sb.Sync()
|
|
sb.Release()
|
|
}
|
|
}
|