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

Method Size

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

Source from the content-addressed store, hash-verified

3795}
3796
3797func (m *MetricMetadata) Size() (n int) {
3798 if m == nil {
3799 return 0
3800 }
3801 var l int
3802 _ = l
3803 if m.Type != 0 {
3804 n += 1 + sovCortex(uint64(m.Type))
3805 }
3806 l = len(m.MetricFamilyName)
3807 if l > 0 {
3808 n += 1 + l + sovCortex(uint64(l))
3809 }
3810 l = len(m.Help)
3811 if l > 0 {
3812 n += 1 + l + sovCortex(uint64(l))
3813 }
3814 l = len(m.Unit)
3815 if l > 0 {
3816 n += 1 + l + sovCortex(uint64(l))
3817 }
3818 return n
3819}
3820
3821func (m *Metric) Size() (n int) {
3822 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