Skip to content

Conversation

michi-covalent
Copy link
Contributor

@michi-covalent michi-covalent commented Jul 18, 2025

Collect pprof CPU profile as a part of the bugtool output. This makes the bugtool command 30 seconds slower, but I think it's still worth it to always collect CPU profile. Having access to CPU profile is immensely valuable for troubleshooting performance issues, and we often end up manually running 'gops pprof-cpu' to collect it anyways.

Bump the timeout for "Test Tetragon with a different tracing-policy-dir" step in Packages e2e Tests from 30 seconds to 60 seconds. This step runs tetra bugtool command.

@michi-covalent michi-covalent added the release-note/minor This PR introduces a minor user-visible change label Jul 18, 2025
@michi-covalent
Copy link
Contributor Author

sample output:

level=info msg="Dumping gops information" gops-address=localhost:8118 gops-path=/usr/bin/gops
level=info msg="executed command" cmd="/usr/bin/gops stack localhost:8118" ret=0 dstFname=gops.stack
level=info msg="executed command" cmd="/usr/bin/gops stats localhost:8118" ret=0 dstFname=gops.stats
level=info msg="executed command" cmd="/usr/bin/gops memstats localhost:8118" ret=0 dstFname=gops.memstats
level=info msg="Contacting gops server for pprof dump" gops-address=localhost:8118
level=info msg="Successfully dumped gops pprof" gops-address=localhost:8118 gops-path=/usr/bin/gops profile=cpu
level=info msg="Contacting gops server for pprof dump" gops-address=localhost:8118
level=info msg="Successfully dumped gops pprof" gops-address=localhost:8118 gops-path=/usr/bin/gops profile=heap

run go tool pprof --http localhost:3333 gops.pprof-cpu to view the profile in a browser.

@michi-covalent michi-covalent force-pushed the pr/michi/pprof-cpu branch 3 times, most recently from 08a29ff to c8d57bf Compare July 19, 2025 01:11
Collect pprof CPU profile as a part of the bugtool output. This makes
the bugtool command 30 seconds slower, but I think it's still worth it
to always collect CPU profile. Having access to CPU profile is immensely
valuable for troubleshooting performance issues, and we often end up
manually running 'gops pprof-cpu' to collect it anyways.

Bump the timeout for "Test Tetragon with a different tracing-policy-dir"
step in Packages e2e Tests from 30 seconds to 60 seconds. This step runs
tetra bugtool command.

Signed-off-by: Michi Mutsuzaki <[email protected]>
@michi-covalent michi-covalent marked this pull request as ready for review July 19, 2025 04:38
@michi-covalent michi-covalent requested a review from a team as a code owner July 19, 2025 04:38
@michi-covalent michi-covalent requested a review from jrfastab July 19, 2025 04:38
Copy link
Contributor

@olsajiri olsajiri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@michi-covalent michi-covalent merged commit 15f723f into main Jul 21, 2025
48 checks passed
@michi-covalent michi-covalent deleted the pr/michi/pprof-cpu branch July 21, 2025 18:28
@michi-covalent michi-covalent added backport-pending/1.3 The backport for this PR is in progress. backport-pending/1.4 labels Jul 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-pending/1.3 The backport for this PR is in progress. backport-pending/1.4 release-note/minor This PR introduces a minor user-visible change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants