Changeset View
Changeset View
Standalone View
Standalone View
src/bench/addrman.cpp
Show First 20 Lines • Show All 90 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
static void AddrManGetAddr(benchmark::Bench &bench) { | static void AddrManGetAddr(benchmark::Bench &bench) { | ||||
CAddrMan addrman; | CAddrMan addrman; | ||||
FillAddrMan(addrman); | FillAddrMan(addrman); | ||||
bench.run([&] { | bench.run([&] { | ||||
const auto &addresses = addrman.GetAddr(); | const auto &addresses = addrman.GetAddr(2500, 23); | ||||
assert(addresses.size() > 0); | assert(addresses.size() > 0); | ||||
}); | }); | ||||
} | } | ||||
static void AddrManGood(benchmark::Bench &bench) { | static void AddrManGood(benchmark::Bench &bench) { | ||||
/* | /* | ||||
* Create many CAddrMan objects - one to be modified at each loop iteration. | * Create many CAddrMan objects - one to be modified at each loop iteration. | ||||
* This is necessary because the CAddrMan::Good() method modifies the | * This is necessary because the CAddrMan::Good() method modifies the | ||||
Show All 33 Lines |