Dump conversion factor on completion

pull/5306/head
Philip O'Toole 2016-01-07 13:50:56 -08:00
parent bab2a00e5d
commit 13d2b69c29
1 changed files with 14 additions and 9 deletions

View File

@ -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()
}