MCPcopy Create free account
hub / github.com/dgraph-io/dgraph / mapEntrySize

Function mapEntrySize

dgraph/cmd/bulk/mapper.go:82–84  ·  view source on GitHub ↗

type mapEntry struct { uid uint64 // if plist is filled, then corresponds to plist's uid. key []byte plist []byte }

(key []byte, p *pb.Posting)

Source from the content-addressed store, hash-verified

80// }
81
82func mapEntrySize(key []byte, p *pb.Posting) int {
83 return 8 + 4 + 4 + len(key) + proto.Size(p) // UID + keySz + postingSz + len(key) + size(p)
84}
85
86func marshalMapEntry(dst []byte, uid uint64, key []byte, p *pb.Posting) {
87 if p != nil {

Callers 1

addMapEntryMethod · 0.85

Calls 1

SizeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…