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

Method Size

bitmap/pb.pb.go:11909–11957  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11907}
11908
11909func (m *SchemaUpdate) Size() (n int) {
11910 if m == nil {
11911 return 0
11912 }
11913 var l int
11914 _ = l
11915 l = len(m.Predicate)
11916 if l > 0 {
11917 n += 1 + l + sovPb(uint64(l))
11918 }
11919 if m.ValueType != 0 {
11920 n += 1 + sovPb(uint64(m.ValueType))
11921 }
11922 if m.Directive != 0 {
11923 n += 1 + sovPb(uint64(m.Directive))
11924 }
11925 if len(m.Tokenizer) > 0 {
11926 for _, s := range m.Tokenizer {
11927 l = len(s)
11928 n += 1 + l + sovPb(uint64(l))
11929 }
11930 }
11931 if m.Count {
11932 n += 2
11933 }
11934 if m.List {
11935 n += 2
11936 }
11937 if m.Upsert {
11938 n += 2
11939 }
11940 if m.Lang {
11941 n += 2
11942 }
11943 if m.NonNullable {
11944 n += 2
11945 }
11946 if m.NonNullableList {
11947 n += 2
11948 }
11949 l = len(m.ObjectTypeName)
11950 if l > 0 {
11951 n += 1 + l + sovPb(uint64(l))
11952 }
11953 if m.NoConflict {
11954 n += 2
11955 }
11956 return n
11957}
11958
11959func (m *TypeUpdate) Size() (n int) {
11960 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