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
Setup tracing-flame for use profiling zebrad #436
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for getting this working!
Have you tested it?
I'm not sure if it will work on all platforms, or on all future compiler versions.
@hdevalence the initial implementation didn't have any plaform specific code and just relied entirely on I don't think switching to only handling |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
I'd like us to document the new exit codes, but otherwise I think we're fine here.
match shutdown { | ||
Shutdown::Graceful => process::exit(0), | ||
Shutdown::Forced => process::exit(1), | ||
Shutdown::Crash => process::exit(2), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not asking for an implementation change here. I don't think having specific return codes for each signal is useful or important for zebrad.
But these new return codes should be documented somewhere in the book.
Let's also document that unhandled signals still use the default return codes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the default log level has to be "warn", for commands that use standard output.
Otherwise looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just one doc tweak, then I think we're done.
Co-authored-by: teor <teor@riseup.net>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that the structure of the tracing setup code is very good but as noted in this comment #436 (comment) I think that this awkwardness is forced by our previous decision to upstream our tracing component, which we now have no control over. I would like to try to fix this and "componentize" many of the other parts we currently construct ad-hoc in a later PR.
I still have concerns about the platform-specific behavior but I don't want to block this PR on it.
part of ZcashFoundation/zfnd#60