Skip to content

Commit

Permalink
Merge pull request whywaita#21 from site0801/fix/exclude-some-commit-…
Browse files Browse the repository at this point in the history
…from-revert-v0.0.9-v0.0.11

Fix/exclude some commit from revert v0.0.9 v0.0.11
  • Loading branch information
whywaita authored Sep 12, 2023
2 parents ab32442 + 84d24ed commit b022f83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/pkg/lxdclient/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type Resource struct {

// GetCPUOverCommitPercent calculate percent of over commit
func GetCPUOverCommitPercent(in Resource) uint64 {
return (in.CPUUsed / in.CPUTotal) * 100
return uint64(float64(in.CPUUsed) / float64(in.CPUTotal) * 100.0)
}

// GetResource get Resource
Expand Down

0 comments on commit b022f83

Please sign in to comment.