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

Method Size

tempodb/backend/v1.pb.go:561–608  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

559 return base
560}
561func (m *BlockMeta) Size() (n int) {
562 if m == nil {
563 return 0
564 }
565 var l int
566 _ = l
567 l = len(m.Version)
568 if l > 0 {
569 n += 1 + l + sovV1(uint64(l))
570 }
571 l = m.BlockID.Size()
572 n += 1 + l + sovV1(uint64(l))
573 l = len(m.TenantID)
574 if l > 0 {
575 n += 1 + l + sovV1(uint64(l))
576 }
577 l = github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime)
578 n += 1 + l + sovV1(uint64(l))
579 l = github_com_gogo_protobuf_types.SizeOfStdTime(m.EndTime)
580 n += 1 + l + sovV1(uint64(l))
581 if m.TotalObjects != 0 {
582 n += 1 + sovV1(uint64(m.TotalObjects))
583 }
584 if m.Size_ != 0 {
585 n += 1 + sovV1(uint64(m.Size_))
586 }
587 if m.CompactionLevel != 0 {
588 n += 1 + sovV1(uint64(m.CompactionLevel))
589 }
590 if m.IndexPageSize != 0 {
591 n += 1 + sovV1(uint64(m.IndexPageSize))
592 }
593 if m.TotalRecords != 0 {
594 n += 1 + sovV1(uint64(m.TotalRecords))
595 }
596 if m.BloomShardCount != 0 {
597 n += 1 + sovV1(uint64(m.BloomShardCount))
598 }
599 if m.FooterSize != 0 {
600 n += 2 + sovV1(uint64(m.FooterSize))
601 }
602 l = m.DedicatedColumns.Size()
603 n += 2 + l + sovV1(uint64(l))
604 if m.ReplicationFactor != 0 {
605 n += 2 + sovV1(uint64(m.ReplicationFactor))
606 }
607 return n
608}
609
610func (m *CompactedBlockMeta) Size() (n int) {
611 if m == nil {

Callers 3

XXX_SizeMethod · 0.95
MarshalMethod · 0.95
MarshalToMethod · 0.95

Calls 2

sovV1Function · 0.85
SizeMethod · 0.65

Tested by

no test coverage detected