mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix storage commit rate
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user