vc: utils: Rename CalculateMilliCPUs() to CalculateCPUsF()

With the change done in the last commit, instead of calculating milli
cpus, we're actually converting the CPUs to a fraction number, a float.

Let's update the function name (and associated vars) to represent that
change.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
Fabiano Fidêncio
2023-11-10 18:14:04 +01:00
parent e477ed0e86
commit 5e9cf75937
4 changed files with 12 additions and 12 deletions

View File

@@ -1272,7 +1272,7 @@ func CalculateContainerSizing(spec *specs.Spec) (numCPU float32, memSizeMB uint3
}
func calculateVMResources(period uint64, quota int64, memory int64) (numCPU float32, memSizeMB uint32) {
numCPU = vcutils.CalculateMilliCPUs(quota, period)
numCPU = vcutils.CalculateCPUsF(quota, period)
if memory < 0 {
// While spec allows for a negative value to indicate unconstrained, we don't