Skip to content

Commit 9911d5b

Browse files
authored
Add segment,field level binlog size summary (#231)
add FieldBinlog size & Segment Binlog size summary output for detailed table view Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
1 parent 8bd3957 commit 9911d5b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

states/etcd/show/segment.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ func PrintSegmentInfo(info *models.Segment, detailBinlog bool) {
160160
return info.GetBinlogs()[i].FieldID < info.GetBinlogs()[j].FieldID
161161
})
162162
for _, log := range info.GetBinlogs() {
163+
var fieldLogSize int64
163164
fmt.Printf("Field %d:\n", log.FieldID)
164165
for _, binlog := range log.Binlogs {
165166
fmt.Printf("Path: %s\n", binlog.LogPath)
@@ -169,8 +170,11 @@ func PrintSegmentInfo(info *models.Segment, detailBinlog bool) {
169170
binlog.LogSize, binlog.EntriesNum,
170171
tf.Format(tsPrintFormat), tt.Format(tsPrintFormat))
171172
binlogSize += binlog.LogSize
173+
fieldLogSize += binlog.LogSize
172174
}
175+
fmt.Println("--- Field Log Size:", hrSize(fieldLogSize))
173176
}
177+
fmt.Println("=== Segment Total Binlog Size: ", hrSize(binlogSize))
174178

175179
fmt.Println("**************************************")
176180
fmt.Println("Statslogs:")

0 commit comments

Comments
 (0)