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

Method Size

bitmap/pb.pb.go:11850–11892  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11848}
11849
11850func (m *SchemaNode) Size() (n int) {
11851 if m == nil {
11852 return 0
11853 }
11854 var l int
11855 _ = l
11856 l = len(m.Predicate)
11857 if l > 0 {
11858 n += 1 + l + sovPb(uint64(l))
11859 }
11860 l = len(m.Type)
11861 if l > 0 {
11862 n += 1 + l + sovPb(uint64(l))
11863 }
11864 if m.Index {
11865 n += 2
11866 }
11867 if len(m.Tokenizer) > 0 {
11868 for _, s := range m.Tokenizer {
11869 l = len(s)
11870 n += 1 + l + sovPb(uint64(l))
11871 }
11872 }
11873 if m.Reverse {
11874 n += 2
11875 }
11876 if m.Count {
11877 n += 2
11878 }
11879 if m.List {
11880 n += 2
11881 }
11882 if m.Upsert {
11883 n += 2
11884 }
11885 if m.Lang {
11886 n += 2
11887 }
11888 if m.NoConflict {
11889 n += 2
11890 }
11891 return n
11892}
11893
11894func (m *SchemaResult) Size() (n int) {
11895 if m == nil {

Callers 3

XXX_SizeMethod · 0.95
MarshalMethod · 0.95
MarshalToMethod · 0.95

Calls 1

sovPbFunction · 0.85

Tested by

no test coverage detected