MCPcopy
hub / github.com/grafana/tempo / Size

Method Size

pkg/tempopb/tempo.pb.go:6482–6509  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6480}
6481
6482func (m *Span) Size() (n int) {
6483 if m == nil {
6484 return 0
6485 }
6486 var l int
6487 _ = l
6488 l = len(m.SpanID)
6489 if l > 0 {
6490 n += 1 + l + sovTempo(uint64(l))
6491 }
6492 l = len(m.Name)
6493 if l > 0 {
6494 n += 1 + l + sovTempo(uint64(l))
6495 }
6496 if m.StartTimeUnixNano != 0 {
6497 n += 1 + sovTempo(uint64(m.StartTimeUnixNano))
6498 }
6499 if m.DurationNanos != 0 {
6500 n += 1 + sovTempo(uint64(m.DurationNanos))
6501 }
6502 if len(m.Attributes) > 0 {
6503 for _, e := range m.Attributes {
6504 l = e.Size()
6505 n += 1 + l + sovTempo(uint64(l))
6506 }
6507 }
6508 return n
6509}
6510
6511func (m *SearchMetrics) Size() (n int) {
6512 if m == nil {

Callers 3

XXX_SizeMethod · 0.95
MarshalMethod · 0.95
MarshalToMethod · 0.95

Calls 2

sovTempoFunction · 0.85
SizeMethod · 0.65

Tested by

no test coverage detected