fix #863 Swap.UsedPercent is inconsistent

pull/864/head
GameXG 5 years ago committed by GitHub
parent a81cf97fce
commit 144c67833a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -84,7 +84,7 @@ func SwapMemoryWithContext(ctx context.Context) (*SwapMemoryStat, error) {
if tot == 0 {
usedPercent = 0
} else {
usedPercent = float64(used) / float64(tot)
usedPercent = float64(used) / float64(tot) * 100
}
ret := &SwapMemoryStat{
Total: tot,

Loading…
Cancel
Save