mirror of https://github.com/ceph/go-ceph
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()
|
||
|
}
|
||
|
}
|