mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-09 12:07:47 +00:00
Merge pull request #118432 from testwill/stats
chore: loop optimization
This commit is contained in:
commit
92c4b3254f
@ -898,9 +898,7 @@ func makeFakePodSandboxStatsStrictlyFromCRI(seed int, podSandbox *critest.FakePo
|
||||
},
|
||||
Linux: &runtimeapi.LinuxPodSandboxStats{},
|
||||
}
|
||||
for _, cs := range podContainerStats {
|
||||
podSandboxStats.Linux.Containers = append(podSandboxStats.Linux.Containers, cs)
|
||||
}
|
||||
podSandboxStats.Linux.Containers = append(podSandboxStats.Linux.Containers, podContainerStats...)
|
||||
if podSandbox.State == runtimeapi.PodSandboxState_SANDBOX_NOTREADY {
|
||||
podSandboxStats.Linux.Cpu = nil
|
||||
podSandboxStats.Linux.Memory = nil
|
||||
|
Loading…
Reference in New Issue
Block a user