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

Method Size

bitmap/pb.pb.go:12448–12471  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12446}
12447
12448func (m *BulkMeta) Size() (n int) {
12449 if m == nil {
12450 return 0
12451 }
12452 var l int
12453 _ = l
12454 if m.EdgeCount != 0 {
12455 n += 1 + sovPb(uint64(m.EdgeCount))
12456 }
12457 if len(m.SchemaMap) > 0 {
12458 for k, v := range m.SchemaMap {
12459 _ = k
12460 _ = v
12461 l = 0
12462 if v != nil {
12463 l = v.Size()
12464 l += 1 + sovPb(uint64(l))
12465 }
12466 mapEntrySize := 1 + len(k) + sovPb(uint64(len(k))) + l
12467 n += mapEntrySize + 1 + sovPb(uint64(mapEntrySize))
12468 }
12469 }
12470 return n
12471}
12472
12473func sovPb(x uint64) (n int) {
12474 return (math_bits.Len64(x|1) + 6) / 7

Callers 3

XXX_SizeMethod · 0.95
MarshalMethod · 0.95
MarshalToMethod · 0.95

Calls 2

sovPbFunction · 0.85
SizeMethod · 0.45

Tested by

no test coverage detected