@@ -598,20 +598,21 @@ func (m *Metrics) RemoteTablesTotal() (count uint64, size uint64) {
598
598
return remoteCount , remoteSize
599
599
}
600
600
601
- // String pretty-prints the metrics as below:
601
+ // String pretty-prints the metrics as below (semi-adjusted visually to avoid
602
+ // the crlfmt from auto-reformatting):
603
+ //
604
+ // | | | | ingested | moved | written | | amp | val sep | multilevel
605
+ // level | tables size val-bl vtables | score ff cff | in | tables size | tables size |tables size| read | r w | refsz valblk| top in read
606
+ // ------+-----------------------------+----------------+-------+--------------+--------------+-----------+-------+---------+--------------+------------------
607
+ // 0 | 101 102B 0B 101 | 1.10 2.10 0.30 | 104B | 112 104B | 113 106B | 221 217B| 107B | 1 2.09 | 114B 0B| 104B 104B 104B
608
+ // 1 | 201 202B 0B 201 | 1.20 2.20 0.60 | 204B | 212 204B | 213 206B | 421 417B| 207B | 2 2.04 | 214B 0B| 204B 204B 204B
609
+ // 2 | 301 302B 0B 301 | 1.30 2.30 0.90 | 304B | 312 304B | 313 306B | 621 617B| 307B | 3 2.03 | 314B 0B| 304B 304B 304B
610
+ // 3 | 401 402B 0B 401 | 1.40 2.40 1.20 | 404B | 412 404B | 413 406B | 821 817B| 407B | 4 2.02 | 414B 0B| 404B 404B 404B
611
+ // 4 | 501 502B 0B 501 | 1.50 2.50 1.50 | 504B | 512 504B | 513 506B |1.0K 1017B| 507B | 5 2.02 | 514B 0B| 504B 504B 504B
612
+ // 5 | 601 602B 0B 601 | 1.60 2.60 1.80 | 604B | 612 604B | 613 606B |1.2K 1.2KB| 607B | 6 2.01 | 614B 0B| 604B 604B 604B
613
+ // 6 | 701 702B 0B 701 | - 2.70 2.10 | 704B | 712 704B | 713 706B |1.4K 1.4KB| 707B | 7 2.01 | 714B 0B| 704B 704B 704B
614
+ // total | 2.8K 2.7KB 0B 2.8K | - - - | 2.8KB | 2.9K 2.8KB | 2.9K 2.8KB |5.7K 8.4KB| 2.8KB | 28 3.00 |2.8KB 0B| 2.8KB 2.8KB 2.8KB
602
615
//
603
- // | | | | ingested | moved | written | | amp | multilevel
604
- // level | tables size val-bl vtables | score uc c | in | tables size | tables size | tables size | read | r w | top in read
605
- // ------+-----------------------------+----------------+-------+--------------+--------------+--------------+-------+----------+------------------
606
- // 0 | 101 102B 0B 101 | 1.10 2.10 0.30 | 104B | 112 104B | 113 106B | 221 217B | 107B | 1 2.09 | 104B 104B 104B
607
- // 1 | 201 202B 0B 201 | 1.20 2.20 0.60 | 204B | 212 204B | 213 206B | 421 417B | 207B | 2 2.04 | 204B 204B 204B
608
- // 2 | 301 302B 0B 301 | 1.30 2.30 0.90 | 304B | 312 304B | 313 306B | 621 617B | 307B | 3 2.03 | 304B 304B 304B
609
- // 3 | 401 402B 0B 401 | 1.40 2.40 1.20 | 404B | 412 404B | 413 406B | 821 817B | 407B | 4 2.02 | 404B 404B 404B
610
- // 4 | 501 502B 0B 501 | 1.50 2.50 1.50 | 504B | 512 504B | 513 506B | 1.0K 1017B | 507B | 5 2.02 | 504B 504B 504B
611
- // 5 | 601 602B 0B 601 | 1.60 2.60 1.80 | 604B | 612 604B | 613 606B | 1.2K 1.2KB | 607B | 6 2.01 | 604B 604B 604B
612
- // 6 | 701 702B 0B 701 | - 2.70 2.10 | 704B | 712 704B | 713 706B | 1.4K 1.4KB | 707B | 7 2.01 | 704B 704B 704B
613
- // total | 2.8K 2.7KB 0B 2.8K | - - - | 2.8KB | 2.9K 2.8KB | 2.9K 2.8KB | 5.7K 8.4KB | 2.8KB | 28 3.00 | 2.8KB 2.8KB 2.8KB
614
- // ------------------------------------------------------------------------------------------------------------------------------------------------
615
616
// WAL: 22 files (24B) in: 25B written: 26B (4% overhead)
616
617
// Flushes: 8
617
618
// Compactions: 5 estimated debt: 6B in progress: 2 (7B)
@@ -631,6 +632,8 @@ func (m *Metrics) RemoteTablesTotal() (count uint64, size uint64) {
631
632
// Filter utility: 47.4%
632
633
// Ingestions: 27 as flushable: 36 (34B in 35 tables)
633
634
// Cgo memory usage: 15KB block cache: 9.0KB (data: 4.0KB, maps: 2.0KB, entries: 3.0KB) memtables: 5.0KB
635
+ //
636
+ //nolint:lll
634
637
func (m * Metrics ) String () string {
635
638
return redact .StringWithoutMarkers (m )
636
639
}
@@ -655,13 +658,13 @@ func (m *Metrics) SafeFormat(w redact.SafePrinter, _ rune) {
655
658
w .SafeString ("\n " )
656
659
}
657
660
658
- w .SafeString (" | | | | ingested | moved | written | | amp" )
659
- appendIfMulti (" | multilevel" )
661
+ w .SafeString (" | | | | ingested | moved | written | | amp | val sep " )
662
+ appendIfMulti (" | multilevel" )
660
663
newline ()
661
- w .SafeString ("level | tables size val-bl vtables | score ff cff | in | tables size | tables size | tables size | read | r w" )
662
- appendIfMulti (" | top in read" )
664
+ w .SafeString ("level | tables size val-bl vtables | score ff cff | in | tables size | tables size | tables size | read | r w | refsz valblk " )
665
+ appendIfMulti (" | top in read" )
663
666
newline ()
664
- w .SafeString ("------+-----------------------------+----------------+-------+--------------+--------------+--------------+-------+---------" )
667
+ w .SafeString ("------+-----------------------------+----------------+-------+--------------+--------------+--------------+-------+----------+-------------- " )
665
668
appendIfMulti ("-+------------------" )
666
669
newline ()
667
670
@@ -672,7 +675,7 @@ func (m *Metrics) SafeFormat(w redact.SafePrinter, _ rune) {
672
675
// Format a zero level score as a dash.
673
676
score = math .NaN ()
674
677
}
675
- w .Printf ("| %5s %6s %6s %7s | %4s %4s %4s | %5s | %5s %6s | %5s %6s | %5s %6s | %5s | %3d %4s" ,
678
+ w .Printf ("| %5s %6s %6s %7s | %4s %4s %4s | %5s | %5s %6s | %5s %6s | %5s %6s | %5s | %3d %4s | %5s %7s " ,
676
679
humanize .Count .Int64 (m .TablesCount ),
677
680
humanize .Bytes .Int64 (m .TablesSize ),
678
681
humanize .Bytes .Uint64 (m .Additional .ValueBlocksSize ),
@@ -690,6 +693,8 @@ func (m *Metrics) SafeFormat(w redact.SafePrinter, _ rune) {
690
693
humanize .Bytes .Uint64 (m .TableBytesRead ),
691
694
redact .Safe (m .Sublevels ),
692
695
humanizeFloat (m .WriteAmp (), 4 ),
696
+ humanize .Bytes .Uint64 (m .EstimatedReferencesSize ),
697
+ humanize .Bytes .Uint64 (m .Additional .ValueBlocksSize ),
693
698
)
694
699
695
700
if multiExists {
@@ -721,7 +726,7 @@ func (m *Metrics) SafeFormat(w redact.SafePrinter, _ rune) {
721
726
w .SafeString ("total " )
722
727
formatRow (& total )
723
728
724
- w .SafeString ("----------------------------------------------------------------------------------------------------------------------------" )
729
+ w .SafeString ("-------------------------------------------------------------------------------------------------------------------------------------------- " )
725
730
appendIfMulti ("--------------------" )
726
731
newline ()
727
732
w .Printf ("WAL: %d files (%s) in: %s written: %s (%.0f%% overhead)" ,
0 commit comments