diff --git a/cmd/influx_tsm/main.go b/cmd/influx_tsm/main.go index ad41e71e41..592b2a4d58 100644 --- a/cmd/influx_tsm/main.go +++ b/cmd/influx_tsm/main.go @@ -201,16 +201,21 @@ func main() { pg.Wait() // Dump stats. + preSize := tsdb.ShardInfos(shards).Size() + postSize := TsmBytesWritten fmt.Printf("\nSummary statistics\n========================================\n") - fmt.Printf("Databases converted: %d\n", len(tsdb.ShardInfos(shards).Databases())) - fmt.Printf("Shards converted: %d\n", len(shards)) - fmt.Printf("TSM files created: %d\n", TsmFilesCreated) - fmt.Printf("Points read: %d\n", PointsRead) - fmt.Printf("Points written: %d\n", PointsWritten) - fmt.Printf("NaN filtered: %d\n", NanFiltered) - fmt.Printf("Inf filtered: %d\n", InfFiltered) - fmt.Printf("Points without fields filtered: %d\n", b1.NoFieldsFiltered+bz1.NoFieldsFiltered) - fmt.Printf("Total conversion time: %v\n", time.Now().Sub(conversionStart)) + fmt.Printf("Databases converted: %d\n", len(tsdb.ShardInfos(shards).Databases())) + fmt.Printf("Shards converted: %d\n", len(shards)) + fmt.Printf("TSM files created: %d\n", TsmFilesCreated) + fmt.Printf("Points read: %d\n", PointsRead) + fmt.Printf("Points written: %d\n", PointsWritten) + fmt.Printf("NaN filtered: %d\n", NanFiltered) + fmt.Printf("Inf filtered: %d\n", InfFiltered) + fmt.Printf("Points without fields filtered: %d\n", b1.NoFieldsFiltered+bz1.NoFieldsFiltered) + fmt.Printf("Disk usage pre-conversion (bytes): %d\n", preSize) + fmt.Printf("Disk usage post-conversion (bytes): %d\n", postSize) + fmt.Printf("Reduction factor: %d%%\n", (100*preSize-postSize)/preSize) + fmt.Printf("Total conversion time: %v\n", time.Now().Sub(conversionStart)) fmt.Println() }