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

Method Size

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

Source from the content-addressed store, hash-verified

3646}
3647
3648func (m *ExemplarV2) Size() (n int) {
3649 if m == nil {
3650 return 0
3651 }
3652 var l int
3653 _ = l
3654 if len(m.LabelsRefs) > 0 {
3655 l = 0
3656 for _, e := range m.LabelsRefs {
3657 l += sovCortex(uint64(e))
3658 }
3659 n += 1 + sovCortex(uint64(l)) + l
3660 }
3661 if m.Value != 0 {
3662 n += 9
3663 }
3664 if m.Timestamp != 0 {
3665 n += 1 + sovCortex(uint64(m.Timestamp))
3666 }
3667 return n
3668}
3669
3670func (m *MetadataV2) Size() (n int) {
3671 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