MCPcopy Create free account
hub / github.com/ElementsProject/elements / AddrManGetAddr

Function AddrManGetAddr

src/bench/addrman.cpp:97–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97static void AddrManGetAddr(benchmark::Bench& bench)
98{
99 AddrMan addrman{EMPTY_ASMAP, /*deterministic=*/false, ADDRMAN_CONSISTENCY_CHECK_RATIO};
100
101 FillAddrMan(addrman);
102
103 bench.run([&] {
104 const auto& addresses = addrman.GetAddr(/* max_addresses */ 2500, /* max_pct */ 23, /* network */ std::nullopt);
105 assert(addresses.size() > 0);
106 });
107}
108
109static void AddrManAddThenGood(benchmark::Bench& bench)
110{

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