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

Method Size

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

Source from the content-addressed store, hash-verified

3834}
3835
3836func (m *Exemplar) Size() (n int) {
3837 if m == nil {
3838 return 0
3839 }
3840 var l int
3841 _ = l
3842 if len(m.Labels) > 0 {
3843 for _, e := range m.Labels {
3844 l = e.Size()
3845 n += 1 + l + sovCortex(uint64(l))
3846 }
3847 }
3848 if m.Value != 0 {
3849 n += 9
3850 }
3851 if m.TimestampMs != 0 {
3852 n += 1 + sovCortex(uint64(m.TimestampMs))
3853 }
3854 return n
3855}
3856
3857func (m *Histogram) Size() (n int) {
3858 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