MCPcopy Create free account
hub / github.com/cortexproject/cortex / Size

Method Size

pkg/querier/tripperware/query.pb.go:2897–2922  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2895}
2896
2897func (m *SampleStream) Size() (n int) {
2898 if m == nil {
2899 return 0
2900 }
2901 var l int
2902 _ = l
2903 if len(m.Labels) > 0 {
2904 for _, e := range m.Labels {
2905 l = e.Size()
2906 n += 1 + l + sovQuery(uint64(l))
2907 }
2908 }
2909 if len(m.Samples) > 0 {
2910 for _, e := range m.Samples {
2911 l = e.Size()
2912 n += 1 + l + sovQuery(uint64(l))
2913 }
2914 }
2915 if len(m.Histograms) > 0 {
2916 for _, e := range m.Histograms {
2917 l = e.Size()
2918 n += 1 + l + sovQuery(uint64(l))
2919 }
2920 }
2921 return n
2922}
2923
2924func (m *SampleHistogramPair) Size() (n int) {
2925 if m == nil {

Callers 3

XXX_SizeMethod · 0.95
MarshalMethod · 0.95
MarshalToMethod · 0.95

Calls 2

sovQueryFunction · 0.85
SizeMethod · 0.65

Tested by

no test coverage detected