aboutsummaryrefslogtreecommitdiff
path: root/weed/storage/needle_map/memdb_test.go
blob: 6f2ed8c75f64d81cf900a71caf9a719356b55cc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package needle_map

import (
	"testing"

	"github.com/seaweedfs/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()
	}

}