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

Method Size

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

Source from the content-addressed store, hash-verified

3705}
3706
3707func (m *WriteResponse) Size() (n int) {
3708 if m == nil {
3709 return 0
3710 }
3711 var l int
3712 _ = l
3713 if m.Code != 0 {
3714 n += 1 + sovCortex(uint64(m.Code))
3715 }
3716 l = len(m.Message)
3717 if l > 0 {
3718 n += 1 + l + sovCortex(uint64(l))
3719 }
3720 if m.Samples != 0 {
3721 n += 1 + sovCortex(uint64(m.Samples))
3722 }
3723 if m.Histograms != 0 {
3724 n += 1 + sovCortex(uint64(m.Histograms))
3725 }
3726 if m.Exemplars != 0 {
3727 n += 1 + sovCortex(uint64(m.Exemplars))
3728 }
3729 return n
3730}
3731
3732func (m *TimeSeries) Size() (n int) {
3733 if m == nil {

Callers 3

XXX_SizeMethod · 0.95
MarshalMethod · 0.95
MarshalToMethod · 0.95

Calls 1

sovCortexFunction · 0.85

Tested by

no test coverage detected