Skip to content

Commit

Permalink
CalculateRealloc tested
Browse files Browse the repository at this point in the history
  • Loading branch information
CMGS committed Feb 3, 2023
1 parent b21cb25 commit 4e11c17
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion resource3/plugins/cpumem/calculate.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (p Plugin) CalculateDeploy(ctx context.Context, nodename string, deployCoun

nodeResourceInfo, err := p.doGetNodeResourceInfo(ctx, nodename)
if err != nil {
logger.Error(ctx, err, "failed to get resource info of node")
logger.WithField("node", nodename).Error(ctx, err)
return nil, err
}

Expand Down
1 change: 1 addition & 0 deletions resource3/plugins/cpumem/types/workload.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ func (w *WorkloadResource) Add(w1 *WorkloadResource) {
// Sub .
func (w *WorkloadResource) Sub(w1 *WorkloadResource) {
w.CPURequest = coreutils.Round(w.CPURequest - w1.CPURequest)
w.CPULimit = coreutils.Round(w.CPULimit - w1.CPULimit)
w.MemoryRequest -= w1.MemoryRequest
w.CPUMap.Sub(w1.CPUMap)
if w.NUMAMemory == nil {
Expand Down

0 comments on commit 4e11c17

Please sign in to comment.