mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
daemon/parsePsOutput: minor optimisation
It does not make sense to keep looking for PID once we found it, so let's give it a break. The side effect of this patch is, if there's more than one column titled "PID", the last (rightmost) column was used before, and now the first (leftmost) column is used. Should make no practical difference whatsoever. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
parent
16670ed484
commit
654a7625fc
1 changed files with 1 additions and 0 deletions
|
@ -70,6 +70,7 @@ func parsePSOutput(output []byte, procs []uint32) (*container.ContainerTopOKBody
|
|||
for i, name := range procList.Titles {
|
||||
if name == "PID" {
|
||||
pidIndex = i
|
||||
break
|
||||
}
|
||||
}
|
||||
if pidIndex == -1 {
|
||||
|
|
Loading…
Add table
Reference in a new issue