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

Method Size

bitmap/pb.pb.go:10745–10799  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10743}
10744
10745func (m *Query) Size() (n int) {
10746 if m == nil {
10747 return 0
10748 }
10749 var l int
10750 _ = l
10751 l = len(m.Attr)
10752 if l > 0 {
10753 n += 1 + l + sovPb(uint64(l))
10754 }
10755 if len(m.Langs) > 0 {
10756 for _, s := range m.Langs {
10757 l = len(s)
10758 n += 1 + l + sovPb(uint64(l))
10759 }
10760 }
10761 if m.AfterUid != 0 {
10762 n += 9
10763 }
10764 if m.DoCount {
10765 n += 2
10766 }
10767 if m.UidList != nil {
10768 l = m.UidList.Size()
10769 n += 1 + l + sovPb(uint64(l))
10770 }
10771 if m.SrcFunc != nil {
10772 l = m.SrcFunc.Size()
10773 n += 1 + l + sovPb(uint64(l))
10774 }
10775 if m.Reverse {
10776 n += 2
10777 }
10778 if m.FacetParam != nil {
10779 l = m.FacetParam.Size()
10780 n += 1 + l + sovPb(uint64(l))
10781 }
10782 if m.FacetsFilter != nil {
10783 l = m.FacetsFilter.Size()
10784 n += 1 + l + sovPb(uint64(l))
10785 }
10786 if m.ExpandAll {
10787 n += 2
10788 }
10789 if m.ReadTs != 0 {
10790 n += 1 + sovPb(uint64(m.ReadTs))
10791 }
10792 if m.Cache != 0 {
10793 n += 1 + sovPb(uint64(m.Cache))
10794 }
10795 if m.First != 0 {
10796 n += 1 + sovPb(uint64(m.First))
10797 }
10798 return n
10799}
10800
10801func (m *ValueList) Size() (n int) {
10802 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