-
Notifications
You must be signed in to change notification settings - Fork 37.7k
bench: Suppress output when running with -sanity-check
option
#26481
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
Conversation
This change allows to simplify CI tests, and makes it easier to integrate the `bench_bitcoin` binary into CMake custom targets or commands, as `COMMAND` does not support output redirection
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsNo conflicts as of last run. |
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.
Concept ACK
This change is nice cleanup to master. Since sanity-checking the benchmark result is useless and will be redirected to NUL, it is better to suppress them and remove the need for output redirection.
The one thing I am not sure about is this:
as COMMAND does not support output redirection.
I assume by commands, you mean add_custom_commands
here. I did a little reading up on this, but this statement might not be accurate.
But it's not true for the add_custom_command. Redirection should work there as expected.
Unlike to commands in add_custom_command, which are executed as a part of makefile receipts (that is, in the context of some shell), tests are executed directly by CTest, without any shell involved. So, shell mechanisms don't work for tests.
So would you please provide some sources to confirm this claim in the description? Thank you.
Tested ACK ran this: then I ran:
|
.cirrus.yml
Outdated
@@ -175,7 +175,7 @@ task: | |||
- ccache --show-stats | |||
check_script: | |||
- src\test_bitcoin.exe -l test_suite | |||
- src\bench_bitcoin.exe --sanity-check > NUL | |||
- src\bench_bitcoin.exe -sanity-check -priority-level=high |
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.
is there a reason why we changed this to only include -priority-level=high
?
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.
See #26158 (comment)
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.
unrelated: It could make sense to have one CI task run all priorities
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.
Ok. The last commit has been dropped.
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.
unrelated: It could be set to run all priorities explicitly (and mentioned in the CI task name) to make it explicit and documented for devs.
4af665f
to
f1e8959
Compare
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.
tACK f1e8959. Ran as expected and is more practical than using an output redirection.
$ ./src/bench/bench_bitcoin -sanity-check -priority-level=high
Running with -sanity-check option, output is being suppressed as benchmark results will be useless.
This change allows to simplify CI tests, and makes it easier to integrate the
bench_bitcoin
binary into CMake custom targets or commands, asCOMMAND
does not support output redirection.