2 Commits

Author SHA1 Message Date
68d41c68d9 hack/podmansnoop: print arguments
Update the snoop script to also include the arguments to make the output
more useful.

```
$ sudo hack/podmansnoop
PCOMM            PID     PPID    AGE(ms) ARGV
conmon           14964   14952   1.01    /usr/bin/conmon --version
podman           14952   14139   26.07   /usr/bin/podman ps
```

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-11-30 10:38:08 +01:00
3ad5827b2d hack/podmansnoop
Add a script to measure the execution times of podman, crun, run and
conmon.  It's a trimmed down version of the exitsnoop tool and intended
to guide us in future performance optimizations.

The below output was generated when running

`podman run --net=host docker.io/library/alpine:latest true`

```
podman (snoop) $ sudo ./hack/podmansnoop
PCOMM            PID     PPID    TID     AGE(ms)
conmon           51580   51569   51580   1.67
conmon           51583   51569   51583   3.53
crun             51591   51590   51591   18.28
crun             51593   51569   51593   2.48
conmon           51606   51594   51606   0.85
crun             51608   51594   51608   2.50
podman           51594   51590   51594   176.27
conmon           51590   1950    51590   214.78
podman           51569   40964   51569   431.36
```

In the future, it would be helpful to add the arguments of the commands.
`execsnoop` can reveal them quite nicely but I did not manage to merge
the two scripts due to time constraints.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-10-28 15:51:53 +02:00