Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests/e2e: dump gops information at the end of failed tests #380

Merged
merged 1 commit into from
Sep 2, 2022

Conversation

willfindlay
Copy link
Contributor

This commit introduces the ability to dump gops debug information at the end of failed
end-to-end tests. We start by dumping memory statics as well as a heap profile for the
application. As with metrics, dumps occur every 30 seconds as well as at the end of
a test, and are discarded unless either the test fails or the user has passed
--tetragon.keep-export=true when running the test.

We also dump a copy of the Tetragon binary running in each Tetragon pod. Unlike the other
dumps, this happens only once at the beginning of a test as it is a costlier operation and
the binary is obviously not expected to change. This binary dump can be used in
cominbation with the heap dump to run it through go tool pprof, generating a call graph
that summarizes memory usage throughout Tetragon.

Signed-off-by: William Findlay [email protected]

@willfindlay willfindlay requested a review from kkourt September 1, 2022 20:18
@willfindlay willfindlay requested a review from a team as a code owner September 1, 2022 20:18
This commit introduces the ability to dump gops debug information at the end of failed
end-to-end tests. We start by dumping memory statics as well as a heap profile for the
application. As with metrics, dumps occur every 30 seconds as well as at the end of
a test, and are discarded unless either the test fails or the user has passed
--tetragon.keep-export=true when running the test.

We also dump a copy of the Tetragon binary running in each Tetragon pod. Unlike the other
dumps, this happens only once at the beginning of a test as it is a costlier operation and
the binary is obviously not expected to change. This binary dump can be used in
cominbation with the heap dump to run it through `go tool pprof`, generating a call graph
that summarizes memory usage throughout Tetragon.

Signed-off-by: William Findlay <[email protected]>
@willfindlay willfindlay force-pushed the pr/willfindlay/dump-pprof branch from 791f4ec to 8c0b32e Compare September 1, 2022 20:30
@kkourt kkourt merged commit 736244b into main Sep 2, 2022
@kkourt kkourt deleted the pr/willfindlay/dump-pprof branch September 2, 2022 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants