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

Method Size

bitmap/pb.pb.go:11522–11565  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11520}
11521
11522func (m *Proposal) Size() (n int) {
11523 if m == nil {
11524 return 0
11525 }
11526 var l int
11527 _ = l
11528 if m.Mutations != nil {
11529 l = m.Mutations.Size()
11530 n += 1 + l + sovPb(uint64(l))
11531 }
11532 if len(m.Kv) > 0 {
11533 for _, e := range m.Kv {
11534 l = e.Size()
11535 n += 1 + l + sovPb(uint64(l))
11536 }
11537 }
11538 if m.State != nil {
11539 l = m.State.Size()
11540 n += 1 + l + sovPb(uint64(l))
11541 }
11542 l = len(m.CleanPredicate)
11543 if l > 0 {
11544 n += 1 + l + sovPb(uint64(l))
11545 }
11546 if m.Delta != nil {
11547 l = m.Delta.Size()
11548 n += 1 + l + sovPb(uint64(l))
11549 }
11550 if m.Snapshot != nil {
11551 l = m.Snapshot.Size()
11552 n += 1 + l + sovPb(uint64(l))
11553 }
11554 if m.Index != 0 {
11555 n += 1 + sovPb(uint64(m.Index))
11556 }
11557 if m.ExpectedChecksum != 0 {
11558 n += 1 + sovPb(uint64(m.ExpectedChecksum))
11559 }
11560 if m.Restore != nil {
11561 l = m.Restore.Size()
11562 n += 1 + l + sovPb(uint64(l))
11563 }
11564 return n
11565}
11566
11567func (m *KVS) Size() (n int) {
11568 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