fix: 压缩精确内存回收计划输出
This commit is contained in:
@@ -439,13 +439,16 @@ function compactMemoryPressureCandidate(value: unknown): Record<string, unknown>
|
||||
action: { op: action.op, allowlist: action.allowlist },
|
||||
};
|
||||
if (candidate.kind === "cgroup-memory-reclaim") {
|
||||
const memoryStat = recordOrEmpty(candidate.memoryStat);
|
||||
return {
|
||||
...base,
|
||||
id: candidate.id,
|
||||
kind: candidate.kind,
|
||||
configId: candidate.configId,
|
||||
reason: candidate.reason,
|
||||
risk: candidate.risk,
|
||||
path: candidate.path,
|
||||
workloadSelector: compactWorkloadSelector(candidate.workloadSelector),
|
||||
resolvedPod: compactResolvedPod(candidate.resolvedPod),
|
||||
reclaimBytes: candidate.reclaimBytes,
|
||||
requestedMemoryReclaimBytes: candidate.requestedMemoryReclaimBytes,
|
||||
requestedMemoryReclaim: candidate.requestedMemoryReclaim,
|
||||
estimateKind: candidate.estimateKind,
|
||||
@@ -453,6 +456,7 @@ function compactMemoryPressureCandidate(value: unknown): Record<string, unknown>
|
||||
minimumInactiveAnonBytes: candidate.minimumInactiveAnonBytes,
|
||||
memoryCurrentBytes: candidate.memoryCurrentBytes,
|
||||
memorySwapCurrentBytes: candidate.memorySwapCurrentBytes,
|
||||
inactiveAnonBytes: memoryStat.inactive_anon,
|
||||
};
|
||||
}
|
||||
const identities = Array.isArray(candidate.processIdentities) ? candidate.processIdentities.map(recordOrEmpty) : [];
|
||||
|
||||
Reference in New Issue
Block a user