MCPcopy
hub / github.com/dgraph-io/dgraph / BenchmarkGet

Function BenchmarkGet

posting/lmap_test.go:14–25  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

12)
13
14func BenchmarkGet(b *testing.B) {
15 // lmap := NewMap(false)
16 var key []byte
17 b.RunParallel(func(pb *testing.PB) {
18 for pb.Next() {
19 // i := uint64(rand.Int63())
20 _ = uint64(rand.Int63())
21 _, _ = getNew(key, nil, math.MaxUint64, false)
22 // lmap.Get(i)
23 }
24 })
25}
26
27func BenchmarkGetLinear(b *testing.B) {
28 var key []byte

Callers

nothing calls this directly

Calls 3

getNewFunction · 0.85
Int63Method · 0.80
NextMethod · 0.45

Tested by

no test coverage detected