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

Method Size

bitmap/pb.pb.go:11299–11346  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11297}
11298
11299func (m *DirectedEdge) Size() (n int) {
11300 if m == nil {
11301 return 0
11302 }
11303 var l int
11304 _ = l
11305 if m.Entity != 0 {
11306 n += 9
11307 }
11308 l = len(m.Attr)
11309 if l > 0 {
11310 n += 1 + l + sovPb(uint64(l))
11311 }
11312 l = len(m.Value)
11313 if l > 0 {
11314 n += 1 + l + sovPb(uint64(l))
11315 }
11316 if m.ValueType != 0 {
11317 n += 1 + sovPb(uint64(m.ValueType))
11318 }
11319 if m.ValueId != 0 {
11320 n += 9
11321 }
11322 l = len(m.Label)
11323 if l > 0 {
11324 n += 1 + l + sovPb(uint64(l))
11325 }
11326 l = len(m.Lang)
11327 if l > 0 {
11328 n += 1 + l + sovPb(uint64(l))
11329 }
11330 if m.Op != 0 {
11331 n += 1 + sovPb(uint64(m.Op))
11332 }
11333 if len(m.Facets) > 0 {
11334 for _, e := range m.Facets {
11335 l = e.Size()
11336 n += 1 + l + sovPb(uint64(l))
11337 }
11338 }
11339 if len(m.AllowedPreds) > 0 {
11340 for _, s := range m.AllowedPreds {
11341 l = len(s)
11342 n += 1 + l + sovPb(uint64(l))
11343 }
11344 }
11345 return n
11346}
11347
11348func (m *Mutations) Size() (n int) {
11349 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