mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-17 07:39:22 +00:00
chore: loop optimization
This commit is contained in:
parent
039ae1edf5
commit
9378e580cf
@ -894,9 +894,7 @@ func makeFakePodSandboxStatsStrictlyFromCRI(seed int, podSandbox *critest.FakePo
|
|||||||
},
|
},
|
||||||
Linux: &runtimeapi.LinuxPodSandboxStats{},
|
Linux: &runtimeapi.LinuxPodSandboxStats{},
|
||||||
}
|
}
|
||||||
for _, cs := range podContainerStats {
|
podSandboxStats.Linux.Containers = append(podSandboxStats.Linux.Containers, podContainerStats...)
|
||||||
podSandboxStats.Linux.Containers = append(podSandboxStats.Linux.Containers, cs)
|
|
||||||
}
|
|
||||||
if podSandbox.State == runtimeapi.PodSandboxState_SANDBOX_NOTREADY {
|
if podSandbox.State == runtimeapi.PodSandboxState_SANDBOX_NOTREADY {
|
||||||
podSandboxStats.Linux.Cpu = nil
|
podSandboxStats.Linux.Cpu = nil
|
||||||
podSandboxStats.Linux.Memory = nil
|
podSandboxStats.Linux.Memory = nil
|
||||||
|
Loading…
Reference in New Issue
Block a user