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

Method Size

pkg/cortexpb/cortex.pb.go:3580–3607  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3578}
3579
3580func (m *WriteRequestV2) Size() (n int) {
3581 if m == nil {
3582 return 0
3583 }
3584 var l int
3585 _ = l
3586 if len(m.Symbols) > 0 {
3587 for _, s := range m.Symbols {
3588 l = len(s)
3589 n += 1 + l + sovCortex(uint64(l))
3590 }
3591 }
3592 if len(m.Timeseries) > 0 {
3593 for _, e := range m.Timeseries {
3594 l = e.Size()
3595 n += 1 + l + sovCortex(uint64(l))
3596 }
3597 }
3598 if m.Source != 0 {
3599 n += 1 + sovCortex(uint64(m.Source))
3600 }
3601 if m.SkipLabelNameValidation {
3602 n += 3
3603 }
3604 l = m.MessageWithBufRef.Size()
3605 n += 2 + l + sovCortex(uint64(l))
3606 return n
3607}
3608
3609func (m *TimeSeriesV2) Size() (n int) {
3610 if m == nil {

Callers 3

XXX_SizeMethod · 0.95
MarshalMethod · 0.95
MarshalToMethod · 0.95

Calls 2

sovCortexFunction · 0.85
SizeMethod · 0.65

Tested by

no test coverage detected