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

Method Size

pkg/cortexpb/timeseries.go:279–295  ·  view source on GitHub ↗

Size implements proto.Sizer.

()

Source from the content-addressed store, hash-verified

277
278// Size implements proto.Sizer.
279func (bs *LabelAdapter) Size() (n int) {
280 ls := (*labels.Label)(bs)
281 if bs == nil {
282 return 0
283 }
284 var l int
285 _ = l
286 l = len(ls.Name)
287 if l > 0 {
288 n += 1 + l + sovCortex(uint64(l))
289 }
290 l = len(ls.Value)
291 if l > 0 {
292 n += 1 + l + sovCortex(uint64(l))
293 }
294 return n
295}
296
297// Equal implements proto.Equaler.
298func (bs *LabelAdapter) Equal(other LabelAdapter) bool {

Callers 2

MarshalMethod · 0.95
MarshalToMethod · 0.95

Calls 1

sovCortexFunction · 0.85

Tested by

no test coverage detected