@@ -46,14 +46,14 @@ type LevelMetrics struct {
4646 // sublevel count of 0, implying no read amplification. Only L0 will have
4747 // a sublevel count other than 0 or 1.
4848 Sublevels int32
49- // The total number of files in the level.
50- NumFiles int64
49+ // The total count of sstables in the level.
50+ TablesCount int64
51+ // The total size in bytes of the sstables in the level.
52+ TablesSize int64
5153 // The total number of virtual sstables in the level.
52- NumVirtualFiles uint64
53- // The total size in bytes of the files in the level.
54- Size int64
54+ VirtualTablesCount uint64
5555 // The total size of the virtual sstables in the level.
56- VirtualSize uint64
56+ VirtualTablesSize uint64
5757 // The level's compaction score. This is the compensatedScoreRatio in the
5858 // candidateLevelInfo.
5959 Score float64
@@ -118,10 +118,10 @@ type LevelMetrics struct {
118118
119119// Add updates the counter metrics for the level.
120120func (m * LevelMetrics ) Add (u * LevelMetrics ) {
121- m .NumFiles += u .NumFiles
122- m .NumVirtualFiles += u .NumVirtualFiles
123- m .VirtualSize += u .VirtualSize
124- m .Size += u .Size
121+ m .TablesCount += u .TablesCount
122+ m .VirtualTablesCount += u .VirtualTablesCount
123+ m .VirtualTablesSize += u .VirtualTablesSize
124+ m .TablesSize += u .TablesSize
125125 m .BytesIn += u .BytesIn
126126 m .BytesIngested += u .BytesIngested
127127 m .BytesMoved += u .BytesMoved
@@ -399,7 +399,7 @@ func (m *Metrics) DiskSpaceUsage() uint64 {
399399func (m * Metrics ) NumVirtual () uint64 {
400400 var n uint64
401401 for _ , level := range m .Levels {
402- n += level .NumVirtualFiles
402+ n += level .VirtualTablesCount
403403 }
404404 return n
405405}
@@ -410,7 +410,7 @@ func (m *Metrics) NumVirtual() uint64 {
410410func (m * Metrics ) VirtualSize () uint64 {
411411 var size uint64
412412 for _ , level := range m .Levels {
413- size += level .VirtualSize
413+ size += level .VirtualTablesSize
414414 }
415415 return size
416416}
@@ -449,8 +449,8 @@ func (m *Metrics) Total() LevelMetrics {
449449func (m * Metrics ) RemoteTablesTotal () (count uint64 , size uint64 ) {
450450 var liveTables , liveTableBytes int64
451451 for level := 0 ; level < numLevels ; level ++ {
452- liveTables += m .Levels [level ].NumFiles
453- liveTableBytes += m .Levels [level ].Size
452+ liveTables += m .Levels [level ].TablesCount
453+ liveTableBytes += m .Levels [level ].TablesSize
454454 }
455455 totalCount := liveTables + m .Table .ObsoleteCount + m .Table .ZombieCount
456456 localCount := m .Table .Local .LiveCount + m .Table .Local .ObsoleteCount + m .Table .Local .ZombieCount
@@ -553,10 +553,10 @@ func (m *Metrics) SafeFormat(w redact.SafePrinter, _ rune) {
553553 }
554554
555555 w .Printf ("| %5s %6s %6s %7s | %5s | %5s | %5s %6s | %5s %6s | %5s %6s | %5s | %3d %4s" ,
556- humanize .Count .Int64 (m .NumFiles ),
557- humanize .Bytes .Int64 (m .Size ),
556+ humanize .Count .Int64 (m .TablesCount ),
557+ humanize .Bytes .Int64 (m .TablesSize ),
558558 humanize .Bytes .Uint64 (m .Additional .ValueBlocksSize ),
559- humanize .Count .Uint64 (m .NumVirtualFiles ),
559+ humanize .Count .Uint64 (m .VirtualTablesCount ),
560560 redact .Safe (scoreStr ),
561561 humanize .Bytes .Uint64 (m .BytesIn ),
562562 humanize .Count .Uint64 (m .TablesIngested ),
0 commit comments