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

Method Size

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

Source from the content-addressed store, hash-verified

3956 return n
3957}
3958func (m *BucketSpan) Size() (n int) {
3959 if m == nil {
3960 return 0
3961 }
3962 var l int
3963 _ = l
3964 if m.Offset != 0 {
3965 n += 1 + sozCortex(uint64(m.Offset))
3966 }
3967 if m.Length != 0 {
3968 n += 1 + sovCortex(uint64(m.Length))
3969 }
3970 return n
3971}
3972
3973func sovCortex(x uint64) (n int) {
3974 return (math_bits.Len64(x|1) + 6) / 7

Callers 3

XXX_SizeMethod · 0.95
MarshalMethod · 0.95
MarshalToMethod · 0.95

Calls 2

sozCortexFunction · 0.85
sovCortexFunction · 0.85

Tested by

no test coverage detected