fix storage commit rate

This commit is contained in:
wanyaoqi
2019-03-29 18:53:39 +08:00
committed by Yousong Zhou
parent 2583b4ed83
commit b20a1c454a
+1 -1
View File
@@ -991,7 +991,7 @@ func (cap *SStorageCapacity) GetFree() int {
func (cap *SStorageCapacity) GetCommitRate() float64 {
if cap.Capacity > 0 {
return float64(int(float64(cap.Used)*100.0/float64(cap.Capacity)+0.5) / 100.0)
return float64(int(float64(cap.Used)*100.0/float64(cap.Capacity)+0.5)) / 100.0
} else {
return 0.0
}