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

Method Size

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

Source from the content-addressed store, hash-verified

3546}
3547
3548func (m *WriteRequest) Size() (n int) {
3549 if m == nil {
3550 return 0
3551 }
3552 var l int
3553 _ = l
3554 if len(m.Timeseries) > 0 {
3555 for _, e := range m.Timeseries {
3556 l = e.Size()
3557 n += 1 + l + sovCortex(uint64(l))
3558 }
3559 }
3560 if m.Source != 0 {
3561 n += 1 + sovCortex(uint64(m.Source))
3562 }
3563 if len(m.Metadata) > 0 {
3564 for _, e := range m.Metadata {
3565 l = e.Size()
3566 n += 1 + l + sovCortex(uint64(l))
3567 }
3568 }
3569 if m.SkipLabelNameValidation {
3570 n += 3
3571 }
3572 l = m.MessageWithBufRef.Size()
3573 n += 2 + l + sovCortex(uint64(l))
3574 if m.DiscardOutOfOrder {
3575 n += 3
3576 }
3577 return n
3578}
3579
3580func (m *WriteRequestV2) Size() (n int) {
3581 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