-
Notifications
You must be signed in to change notification settings - Fork 332
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
Add --debug=rpc
and --debug=profiling
flags for enabling debug output
#3352
Conversation
Since we remove the |
Good catch! Fixed in f61aa8a |
|
||
impl Drop for Timer { | ||
fn drop(&mut self) { | ||
let enabled = enabled(); |
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.
let enabled = enabled(); | |
if !enabled() { | |
return; | |
} | |
let enabled = enabled(); |
What about skipping everything if profiling isn't enabled, do you see any downside to this ?
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 would like to give users the option to use either console or JSON profiling, but we can still skip if none is enabled, good idea!
bc105a8
This requires a mutex around the File, otherwise we may end up with garbled entries when two threads write the file concurrently.
Still needs a changelog entry |
Do we want to enable |
I don't think it's needed, the console profiling should work fine for one off commands |
Or perhaps only for |
Yes, I was wondering if we should add it here https://github.com/informalsystems/hermes/pull/3352/files#diff-f4ab9a0749ae805544d3bd5157591c8888bd1ae933688a71b63633d5fd791b94R197. |
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 to me. Tested it and seems to work fine.
.changelog/unreleased/features/ibc-relayer-cli/2852-add-debug-flag.md
Outdated
Show resolved
Hide resolved
Signed-off-by: Romain Ruetschi <romain.ruetschi@gmail.com>
…tput (informalsystems#3352) * Add `--debug=rpc` flag for enabling Tendermint RPC debug info * Add `--debug=rpc` flag for enabling profiling output * Only output profiling info on console if profiling is enabled * Allow comma-separated values * Re-generate templates * Add `json-profiling` debug section, change env variable to `PROFILING_DIR` * Add newline after each JSON entry This requires a mutex around the File, otherwise we may end up with garbled entries when two threads write the file concurrently. * Use atomics instead of once cell for profiling flags * Avoid doing any work when profiling is disabled * Update templates * Add note to guide for profiling-json. Add changelog entry * Update changelog entry Signed-off-by: Romain Ruetschi <romain.ruetschi@gmail.com> --------- Signed-off-by: Romain Ruetschi <romain.ruetschi@gmail.com> Co-authored-by: Luca Joss <luca@informal.systems>
Closes: #2852
Description
This PR implements the proposition in #2852 and removes the
profiling
feature flag.PR author checklist:
unclog
.docs/
).Reviewer checklist:
Files changed
in the GitHub PR explorer.