tests/e2e: dump gops information at the end of failed tests #380
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 graphthat summarizes memory usage throughout Tetragon.
Signed-off-by: William Findlay [email protected]