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

main: add flag to write execution traces #2223

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kcalvinalvin
Copy link
Collaborator

Execution traces are part of the go runtime tooling and is useful to check what is slowing down the ibd. For example, a slow ibd because of slow block downloads from peers won't show up on cpu profiling but will on a trace.

Also execution tracing has gotten a lot better with go 1.22

Execution traces are part of the go runtime tooling and is useful to
check what is slowing down the ibd.  For example, a slow ibd because of
slow block downloads from peers won't show up on cpu profiling but will
on a trace.
@coveralls
Copy link

Pull Request Test Coverage Report for Build 10261087623

Details

  • 0 of 9 (0.0%) changed or added relevant lines in 1 file are covered.
  • 11 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.03%) to 57.208%

Changes Missing Coverage Covered Lines Changed/Added Lines %
btcd.go 0 9 0.0%
Files with Coverage Reduction New Missed Lines %
btcutil/gcs/gcs.go 1 81.25%
peer/peer.go 10 73.86%
Totals Coverage Status
Change from base Build 10067454383: -0.03%
Covered Lines: 29829
Relevant Lines: 52141

💛 - Coveralls

Copy link
Collaborator

@guggero guggero left a comment

Choose a reason for hiding this comment

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

tACK, LGTM 🎉

@@ -114,6 +114,7 @@ type config struct {
ConnectPeers []string `long:"connect" description:"Connect only to the specified peers at startup"`
CPUProfile string `long:"cpuprofile" description:"Write CPU profile to the specified file"`
MemoryProfile string `long:"memprofile" description:"Write memory profile to the specified file"`
TraceProfile string `long:"trace" description:"Write execution trace to the specified file"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: call the flag traceprofile to not confuse it with a log level and be more in line with the other profile flags?

Copy link
Member

Choose a reason for hiding this comment

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

Makes sense ^

Copy link
Member

Choose a reason for hiding this comment

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

Bump on this, can get merged once addressed.

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.

4 participants