You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
381 B

  1. package needle_map
  2. import (
  3. "testing"
  4. "github.com/chrislusf/seaweedfs/weed/storage/types"
  5. )
  6. func BenchmarkMemDb(b *testing.B) {
  7. b.ReportAllocs()
  8. for i := 0; i < b.N; i++ {
  9. nm := NewMemDb()
  10. nid := types.NeedleId(345)
  11. offset := types.Offset{
  12. OffsetHigher: types.OffsetHigher{},
  13. OffsetLower: types.OffsetLower{},
  14. }
  15. nm.Set(nid, offset, 324)
  16. nm.Close()
  17. }
  18. }