analyze: use humanized bytes for max memory

This commit is contained in:
Gyu-Ho Lee 2017-02-04 22:14:18 -08:00
parent 5105680938
commit 3f285e04ce
No known key found for this signature in database
GPG Key ID: 1DDD39C7EB70C24C
1 changed files with 4 additions and 2 deletions

View File

@ -211,9 +211,11 @@ func do(configPath string) error {
row07TransmitBytesSum = append(row07TransmitBytesSum, humanize.Bytes(uint64(transmitBytesNumDeltaSum)))
row08MaxCPUUsage = append(row08MaxCPUUsage, fmt.Sprintf("%.2f %%", maxAvgCPU))
// TODO: linux sometimes returns overflowed value...
// TODO: handle overflowed memory value?
sort.Float64s(maxAvgVMRSSMBs)
row09MaxMemoryUsage = append(row09MaxMemoryUsage, fmt.Sprintf("%.2f MB", maxAvgVMRSSMBs[len(maxAvgVMRSSMBs)-2]))
mv := maxAvgVMRSSMBs[len(maxAvgVMRSSMBs)-1]
mb := uint64(mv * 1000000)
row09MaxMemoryUsage = append(row09MaxMemoryUsage, humanize.Bytes(mb))
}
row05AverageDatasize := []string{"AVG-DATA-SIZE-ON-DISK"} // TOTAL-DATA-SIZE