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

Function AddrManSelect

src/bench/addrman.cpp:85–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85static void AddrManSelect(benchmark::Bench& bench)
86{
87 AddrMan addrman{EMPTY_ASMAP, /*deterministic=*/false, ADDRMAN_CONSISTENCY_CHECK_RATIO};
88
89 FillAddrMan(addrman);
90
91 bench.run([&] {
92 const auto& address = addrman.Select();
93 assert(address.first.GetPort() > 0);
94 });
95}
96
97static void AddrManGetAddr(benchmark::Bench& bench)
98{

Callers

nothing calls this directly

Calls 4

FillAddrManFunction · 0.85
GetPortMethod · 0.80
runMethod · 0.45
SelectMethod · 0.45

Tested by

no test coverage detected