MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / AddrManGetAddr

Function AddrManGetAddr

src/bench/addrman.cpp:140–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140static void AddrManGetAddr(benchmark::Bench& bench)
141{
142 AddrMan addrman{EMPTY_NETGROUPMAN, /*deterministic=*/false, ADDRMAN_CONSISTENCY_CHECK_RATIO};
143
144 FillAddrMan(addrman);
145
146 bench.run([&] {
147 const auto& addresses = addrman.GetAddr(/*max_addresses=*/2500, /*max_pct=*/23, /*network=*/std::nullopt);
148 assert(addresses.size() > 0);
149 });
150}
151
152static void AddrManAddThenGood(benchmark::Bench& bench)
153{

Callers

nothing calls this directly

Calls 4

FillAddrManFunction · 0.85
GetAddrMethod · 0.80
runMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected