Skip to content

Commit

Permalink
Updated comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Bobbins228 committed Nov 22, 2023
1 parent 7c1244a commit d94454d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/controller/queuejob/queuejob_controller_ex.go
Original file line number Diff line number Diff line change
Expand Up @@ -929,17 +929,17 @@ func calculateRequiredResources(namespace string, appwrapperName string, request
memoryRegex := regexp.MustCompile(`memory (\d+(\.\d+)?)`)
gpuRegex := regexp.MustCompile(`GPU (\d+)`)

// requested resources values //
// Requested resources values //
requestedCPU := cpuRegex.FindStringSubmatch(requestedResources)
requestedMemory := memoryRegex.FindStringSubmatch(requestedResources)
requestedGPU := gpuRegex.FindStringSubmatch(requestedResources)

// available resources values //
// Available resources values //
availableCPU := cpuRegex.FindStringSubmatch(totalAvailable)
availableMemory := memoryRegex.FindStringSubmatch(totalAvailable)
availableGPU := gpuRegex.FindStringSubmatch(totalAvailable)

// convert values to float //
// Convert values to float //
requestedCPUValue, err := strconv.ParseFloat(requestedCPU[1], 64)
if err != nil {
klog.Warningf("Error parsing CPU value: ", err)
Expand Down

0 comments on commit d94454d

Please sign in to comment.