-
Notifications
You must be signed in to change notification settings - Fork 852
feat(profiling): Add --trace-profile flag
#6258
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
base: main
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jboewer The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Introduces a new --trace-profile [file] flag to generate a Go execution trace, enabling easier diagnosis of latency-related performance issues Signed-off-by: Jonas Böwer <[email protected]> Signed-off-by: Jonas Böwer <[email protected]>
7cd704c to
b6f15b3
Compare
|
Ephemeral COPR build failed. @containers/packit-build please check. |
|
@jboewer thanks for the contribution. Can you add a test or three for this please? |
… --memory-profile flags Signed-off-by: Jonas Böwer <[email protected]>
Just added tests for all 3 available profiling flags. Though as far as I know, the go tool CLI flags (such as those for Would you prefer to keep the current assertions that use go tool trace/pprof to validate the generated files, or should we limit the tests to just checking that the files are created and non-empty? Edit: Tests were just failing as of this very reason. I used go v1.23 locally which had a different go tool trace CLI than the CI's go v1.24. I've switched to using the more stable -pprof=net flag instead of the debug -d=2 flag, but above's question still stands. |
Signed-off-by: Jonas Böwer <[email protected]>
|
A friendly reminder that this PR had no activity for 30 days. |
|
Hey @TomSweeneyRedHat @nalind, I just noticed I still have this PR open. Do you mind revisiting this subject? Cheers |
|
LGTM |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Introduces a new
--trace-profile [file]flag to generate a Go execution trace, for performance diagnostics usinggo tool trace.Currently, buildah provides flags for profiling CPU
(--cpu-profile)and memory(--memory-profile)usage.However, when a build is slow but CPU usage is low, it's difficult to diagnose the bottleneck. These latency issues are often caused by time spent waiting on I/O (network or disk), blocking on system calls, or other scheduler events. The standard Go tool for investigating these specific issues is the execution tracer (go tool trace).
How to verify it
Run any buildah command with the additional
--trace-profileflag.For example
Which issue(s) this PR fixes:
None
Does this PR introduce a user-facing change?