Skip to content

Commit

Permalink
Merge pull request #118432 from testwill/stats
Browse files Browse the repository at this point in the history
chore: loop optimization
  • Loading branch information
k8s-ci-robot committed Oct 26, 2023
2 parents 266b392 + 9378e58 commit 92c4b32
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/kubelet/stats/cri_stats_provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 92c4b32

Please sign in to comment.