-
Notifications
You must be signed in to change notification settings - Fork 37.7k
bench: add CAddrMan benchmarks #18754
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
The added benchmarks exercise the public methods Add(), GetAddr(), Select() and 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.
ACK a9b9577
return; | ||
} | ||
|
||
FastRandomContext rng(uint256(std::vector<unsigned char>(32, 123))); |
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.
nit: I think you can just set
FastRandomContext rng(uint256(std::vector<unsigned char>(32, 123))); | |
FastRandomContext rng(/* deterministic */ true); |
or is there a reason for the seed?
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.
Right, /* deterministic */ true
would have been better. I will have this in mind and also change this code if I am touching it again.
There is no need for the chosen seed - it only has to be the same every time to reduce noise in performance tests.
Thanks!
cc @naumenkogs (you might be interested in this) |
utACK a9b9577 |
a9b9577 bench: add CAddrMan benchmarks (Vasil Dimov) Pull request description: The added benchmarks exercise the public methods Add(), GetAddr(), Select() and Good(). ACKs for top commit: naumenkogs: utACK a9b9577 MarcoFalke: ACK a9b9577 Tree-SHA512: af54b2fbd97db34faf4cc6c9bacb20d2c97d0aaddb9cf91b220bc2e09227b55345402ed17e34450745493e3a2b286c176c031cdeb477415570a757cee16b06a8
Summary: a9b957740e3490d87e5ce0b7f1b93ba43bb19764 bench: add CAddrMan benchmarks (Vasil Dimov) Pull request description: The added benchmarks exercise the public methods Add(), GetAddr(), Select() and Good(). --- Backport of Core [[bitcoin/bitcoin#18754 | PR18754]] Test Plan: ninja all ./src/bench/bitcoin-bench -filter=AddrMan.* Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Subscribers: Fabien Differential Revision: https://reviews.bitcoinabc.org/D8992
Summary: a9b957740e3490d87e5ce0b7f1b93ba43bb19764 bench: add CAddrMan benchmarks (Vasil Dimov) Pull request description: The added benchmarks exercise the public methods Add(), GetAddr(), Select() and Good(). --- Backport of Core [[bitcoin/bitcoin#18754 | PR18754]] Test Plan: ninja all ./src/bench/bitcoin-bench -filter=AddrMan.* Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Subscribers: Fabien Differential Revision: https://reviews.bitcoinabc.org/D8992
The added benchmarks exercise the public methods Add(), GetAddr(),
Select() and Good().