The added benchmarks exercise the public methods Add(), GetAddr(), Select() and Good().
bench: add CAddrMan benchmarks #18754
pull vasild wants to merge 1 commits into bitcoin:master from vasild:addrman_perf_test changing 2 files +141 −0-
vasild commented at 9:38 AM on April 24, 2020: member
-
a9b957740e
bench: add CAddrMan benchmarks
The added benchmarks exercise the public methods Add(), GetAddr(), Select() and Good().
- fanquake added the label Tests on Apr 24, 2020
-
in src/bench/addrman.cpp:26 in a9b957740e
21 | +{ 22 | + if (g_sources.size() > 0) { // already created 23 | + return; 24 | + } 25 | + 26 | + FastRandomContext rng(uint256(std::vector<unsigned char>(32, 123)));
MarcoFalke commented at 11:48 PM on April 24, 2020:nit: I think you can just set
FastRandomContext rng(/* deterministic */ true);or is there a reason for the seed?
vasild commented at 9:58 AM on April 27, 2020:Right,
/* deterministic */ truewould 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!
MarcoFalke approvedMarcoFalke commented at 11:54 PM on April 24, 2020: memberACK a9b957740e3490d87e5ce0b7f1b93ba43bb19764
MarcoFalke commented at 11:54 PM on April 24, 2020: membercc @naumenkogs (you might be interested in this)
naumenkogs commented at 12:31 PM on April 25, 2020: memberutACK a9b9577
MarcoFalke merged this on Apr 25, 2020MarcoFalke closed this on Apr 25, 2020sidhujag referenced this in commit 505295b28d on Apr 25, 2020vasild deleted the branch on Apr 27, 2020Fabcien referenced this in commit 8b0b3a1909 on Jan 21, 2021ftrader referenced this in commit 333436177e on Apr 14, 2021DrahtBot locked this on Feb 15, 2022ContributorsLabels
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-25 15:15 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-25 15:15 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me