4848 table .Div (),
4949 table .Int ("virt" , 4 , table .AlignRight , func (r compactionTableRow ) int { return r .Virtual }),
5050 table .Div (),
51+ table .Int ("copy" , 4 , table .AlignRight , func (r compactionTableRow ) int { return r .Copy }),
52+ table .Div (),
53+ table .Int ("tomb" , 4 , table .AlignRight , func (r compactionTableRow ) int { return r .Tombstone }),
54+ table .Div (),
55+ table .Int ("rwrt" , 4 , table .AlignRight , func (r compactionTableRow ) int { return r .Rewrite }),
56+ table .Div (),
5157 table .Int ("cnt" , 3 , table .AlignRight , func (r compactionTableRow ) int { return r .Count }),
5258 table .Div (),
5359 table .Bytes ("in(B)" , 5 , table .AlignRight , func (r compactionTableRow ) uint64 { return r .BytesIn }),
@@ -106,6 +112,9 @@ type compactionTableRow struct {
106112 Delete int
107113 Blob int
108114 Virtual int
115+ Copy int
116+ Tombstone int
117+ Rewrite int
109118 Count int
110119 BytesIn uint64
111120 BytesOut uint64
@@ -304,9 +313,12 @@ const (
304313 compactionTypeDefault compactionType = iota
305314 compactionTypeFlush
306315 compactionTypeMove
316+ compactionTypeCopy
307317 compactionTypeDeleteOnly
308318 compactionTypeElisionOnly
309319 compactionTypeRead
320+ compactionTypeTombstoneDensity
321+ compactionTypeRewrite
310322 compactionTypeBlobRewrite
311323 compactionTypeVirtualRewrite
312324)
@@ -318,12 +330,18 @@ func (c compactionType) String() string {
318330 return "default"
319331 case compactionTypeMove :
320332 return "move"
333+ case compactionTypeCopy :
334+ return "copy"
321335 case compactionTypeDeleteOnly :
322336 return "delete-only"
323337 case compactionTypeElisionOnly :
324338 return "elision-only"
325339 case compactionTypeRead :
326340 return "read"
341+ case compactionTypeTombstoneDensity :
342+ return "tombstone-density"
343+ case compactionTypeRewrite :
344+ return "rewrite"
327345 case compactionTypeBlobRewrite :
328346 return "blob-rewrite"
329347 case compactionTypeVirtualRewrite :
@@ -341,12 +359,18 @@ func parseCompactionType(s string) (t compactionType, err error) {
341359 t = compactionTypeDefault
342360 case "move" :
343361 t = compactionTypeMove
362+ case "copy" :
363+ t = compactionTypeCopy
344364 case "delete-only" :
345365 t = compactionTypeDeleteOnly
346366 case "elision-only" :
347367 t = compactionTypeElisionOnly
348368 case "read" :
349369 t = compactionTypeRead
370+ case "tombstone-density" :
371+ t = compactionTypeTombstoneDensity
372+ case "rewrite" :
373+ t = compactionTypeRewrite
350374 case "blob-rewrite" :
351375 t = compactionTypeBlobRewrite
352376 case "virtual-sst-rewrite" :
@@ -794,7 +818,7 @@ func (s windowSummary) String() string {
794818 // Print compactions statistics.
795819 if len (s .compactionCounts ) > 0 {
796820 var compactionRows []compactionTableRow
797- var totalDef , totalMove , totalElision , totalDel , totalBlob , totalVirtual int
821+ var totalDef , totalMove , totalElision , totalDel , totalBlob , totalVirtual , totalCopy , totalTombstone , totalRewrite int
798822 var totalBytesIn , totalBytesOut , totalBytesMoved , totalBytesDel uint64
799823 var totalTime time.Duration
800824
@@ -805,7 +829,10 @@ func (s windowSummary) String() string {
805829 del := p .counts [compactionTypeDeleteOnly ]
806830 blob := p .counts [compactionTypeBlobRewrite ]
807831 virtual := p .counts [compactionTypeVirtualRewrite ]
808- total := def + move + elision + del + blob + virtual
832+ copy := p .counts [compactionTypeCopy ]
833+ tombstone := p .counts [compactionTypeTombstoneDensity ]
834+ rewrite := p .counts [compactionTypeRewrite ]
835+ total := def + move + elision + del + blob + virtual + copy + tombstone + rewrite
809836
810837 compactionRows = append (compactionRows , compactionTableRow {
811838 Kind : "compact" ,
@@ -817,6 +844,9 @@ func (s windowSummary) String() string {
817844 Delete : del ,
818845 Blob : blob ,
819846 Virtual : virtual ,
847+ Copy : copy ,
848+ Tombstone : tombstone ,
849+ Rewrite : rewrite ,
820850 Count : total ,
821851 BytesIn : p .bytesIn ,
822852 BytesOut : p .bytesOut ,
@@ -831,6 +861,9 @@ func (s windowSummary) String() string {
831861 totalDel += del
832862 totalBlob += blob
833863 totalVirtual += virtual
864+ totalCopy += copy
865+ totalTombstone += tombstone
866+ totalRewrite += rewrite
834867 totalBytesIn += p .bytesIn
835868 totalBytesOut += p .bytesOut
836869 totalBytesMoved += p .bytesMoved
@@ -848,6 +881,9 @@ func (s windowSummary) String() string {
848881 Delete : totalDel ,
849882 Blob : totalBlob ,
850883 Virtual : totalVirtual ,
884+ Copy : totalCopy ,
885+ Tombstone : totalTombstone ,
886+ Rewrite : totalRewrite ,
851887 Count : s .eventCount ,
852888 BytesIn : totalBytesIn ,
853889 BytesOut : totalBytesOut ,
0 commit comments