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

Method Size

bitmap/pb.pb.go:11595–11638  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11593}
11594
11595func (m *Posting) Size() (n int) {
11596 if m == nil {
11597 return 0
11598 }
11599 var l int
11600 _ = l
11601 if m.Uid != 0 {
11602 n += 9
11603 }
11604 l = len(m.Value)
11605 if l > 0 {
11606 n += 1 + l + sovPb(uint64(l))
11607 }
11608 if m.ValType != 0 {
11609 n += 1 + sovPb(uint64(m.ValType))
11610 }
11611 if m.PostingType != 0 {
11612 n += 1 + sovPb(uint64(m.PostingType))
11613 }
11614 l = len(m.LangTag)
11615 if l > 0 {
11616 n += 1 + l + sovPb(uint64(l))
11617 }
11618 l = len(m.Label)
11619 if l > 0 {
11620 n += 1 + l + sovPb(uint64(l))
11621 }
11622 if len(m.Facets) > 0 {
11623 for _, e := range m.Facets {
11624 l = e.Size()
11625 n += 1 + l + sovPb(uint64(l))
11626 }
11627 }
11628 if m.Op != 0 {
11629 n += 1 + sovPb(uint64(m.Op))
11630 }
11631 if m.StartTs != 0 {
11632 n += 1 + sovPb(uint64(m.StartTs))
11633 }
11634 if m.CommitTs != 0 {
11635 n += 1 + sovPb(uint64(m.CommitTs))
11636 }
11637 return n
11638}
11639
11640func (m *UidBlock) Size() (n int) {
11641 if m == nil {

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