Skip to content

Commit

Permalink
Different fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
droberts195 committed Dec 8, 2023
1 parent 73d1d29 commit 2110130
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,6 @@ public static class Builder {
public Builder(String jobId) {
this.jobId = jobId;
memoryStatus = MemoryStatus.OK;
assignmentMemoryBasis = AssignmentMemoryBasis.MODEL_MEMORY_LIMIT;
categorizationStatus = CategorizationStatus.OK;
logTime = new Date();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,8 @@ public ByteSizeValue getOpenProcessMemoryUsage() {
for (ProcessContext processContext : processByAllocation.values()) {
if (processContext.getState() == ProcessContext.ProcessStateName.RUNNING) {
ModelSizeStats modelSizeStats = processContext.getAutodetectCommunicator().getModelSizeStats();
memoryUsedBytes += switch (modelSizeStats.getAssignmentMemoryBasis()) {
ModelSizeStats.AssignmentMemoryBasis basis = modelSizeStats.getAssignmentMemoryBasis();
memoryUsedBytes += switch (basis != null ? basis : ModelSizeStats.AssignmentMemoryBasis.MODEL_MEMORY_LIMIT) {
case MODEL_MEMORY_LIMIT -> modelSizeStats.getModelBytesMemoryLimit();
case CURRENT_MODEL_BYTES -> modelSizeStats.getModelBytes();
case PEAK_MODEL_BYTES -> Optional.ofNullable(modelSizeStats.getPeakModelBytes()).orElse(modelSizeStats.getModelBytes());
Expand Down

0 comments on commit 2110130

Please sign in to comment.