|
|
@ -5,6 +5,7 @@
|
|
|
|
#include <addrman.h>
|
|
|
|
#include <addrman.h>
|
|
|
|
#include <bench/bench.h>
|
|
|
|
#include <bench/bench.h>
|
|
|
|
#include <random.h>
|
|
|
|
#include <random.h>
|
|
|
|
|
|
|
|
#include <util/check.h>
|
|
|
|
#include <util/time.h>
|
|
|
|
#include <util/time.h>
|
|
|
|
|
|
|
|
|
|
|
|
#include <optional>
|
|
|
|
#include <optional>
|
|
|
@ -110,7 +111,8 @@ static void AddrManGood(benchmark::Bench& bench)
|
|
|
|
* we want to do the same amount of work in every loop iteration. */
|
|
|
|
* we want to do the same amount of work in every loop iteration. */
|
|
|
|
|
|
|
|
|
|
|
|
bench.epochs(5).epochIterations(1);
|
|
|
|
bench.epochs(5).epochIterations(1);
|
|
|
|
const size_t addrman_count{bench.epochs() * bench.epochIterations()};
|
|
|
|
const uint64_t addrman_count{bench.epochs() * bench.epochIterations()};
|
|
|
|
|
|
|
|
Assert(addrman_count == 5U);
|
|
|
|
|
|
|
|
|
|
|
|
std::vector<std::unique_ptr<CAddrMan>> addrmans(addrman_count);
|
|
|
|
std::vector<std::unique_ptr<CAddrMan>> addrmans(addrman_count);
|
|
|
|
for (size_t i{0}; i < addrman_count; ++i) {
|
|
|
|
for (size_t i{0}; i < addrman_count; ++i) {
|
|
|
|