mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-12-15 02:59:06 +08:00
24 lines
381 B
Go
24 lines
381 B
Go
package needle_map
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/chrislusf/seaweedfs/weed/storage/types"
|
|
)
|
|
|
|
func BenchmarkMemDb(b *testing.B) {
|
|
b.ReportAllocs()
|
|
for i := 0; i < b.N; i++ {
|
|
nm := NewMemDb()
|
|
|
|
nid := types.NeedleId(345)
|
|
offset := types.Offset{
|
|
OffsetHigher: types.OffsetHigher{},
|
|
OffsetLower: types.OffsetLower{},
|
|
}
|
|
nm.Set(nid, offset, 324)
|
|
nm.Close()
|
|
}
|
|
|
|
}
|