mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-11 13:02:14 +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{},
|
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