Bitcoin Core  0.20.99
P2P Digital Currency
Functions | Variables
addrman.cpp File Reference
#include <addrman.h>
#include <bench/bench.h>
#include <random.h>
#include <util/time.h>
#include <vector>
Include dependency graph for addrman.cpp:

Go to the source code of this file.

Functions

static void CreateAddresses ()
 
static void AddAddressesToAddrMan (CAddrMan &addrman)
 
static void FillAddrMan (CAddrMan &addrman)
 
static void AddrManAdd (benchmark::State &state)
 
static void AddrManSelect (benchmark::State &state)
 
static void AddrManGetAddr (benchmark::State &state)
 
static void AddrManGood (benchmark::State &state)
 
 BENCHMARK (AddrManAdd, 5)
 
 BENCHMARK (AddrManSelect, 1000000)
 
 BENCHMARK (AddrManGetAddr, 500)
 
 BENCHMARK (AddrManGood, 2)
 

Variables

static constexpr size_t NUM_SOURCES = 64
 
static constexpr size_t NUM_ADDRESSES_PER_SOURCE = 256
 
static std::vector< CAddressg_sources
 
static std::vector< std::vector< CAddress > > g_addresses
 

Function Documentation

◆ AddAddressesToAddrMan()

static void AddAddressesToAddrMan ( CAddrMan addrman)
static

Definition at line 54 of file addrman.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddrManAdd()

static void AddrManAdd ( benchmark::State state)
static

Definition at line 70 of file addrman.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddrManGetAddr()

static void AddrManGetAddr ( benchmark::State state)
static

Definition at line 94 of file addrman.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddrManGood()

static void AddrManGood ( benchmark::State state)
static

Definition at line 106 of file addrman.cpp.

Here is the call graph for this function:

◆ AddrManSelect()

static void AddrManSelect ( benchmark::State state)
static

Definition at line 82 of file addrman.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BENCHMARK() [1/4]

BENCHMARK ( AddrManAdd  ,
 
)
Here is the caller graph for this function:

◆ BENCHMARK() [2/4]

BENCHMARK ( AddrManSelect  ,
1000000   
)

◆ BENCHMARK() [3/4]

BENCHMARK ( AddrManGetAddr  ,
500   
)

◆ BENCHMARK() [4/4]

BENCHMARK ( AddrManGood  ,
 
)

◆ CreateAddresses()

static void CreateAddresses ( )
static

Definition at line 20 of file addrman.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FillAddrMan()

static void FillAddrMan ( CAddrMan addrman)
static

Definition at line 61 of file addrman.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ g_addresses

std::vector<std::vector<CAddress> > g_addresses
static

Definition at line 18 of file addrman.cpp.

◆ g_sources

std::vector<CAddress> g_sources
static

Definition at line 17 of file addrman.cpp.

◆ NUM_ADDRESSES_PER_SOURCE

constexpr size_t NUM_ADDRESSES_PER_SOURCE = 256
static

Definition at line 15 of file addrman.cpp.

◆ NUM_SOURCES

constexpr size_t NUM_SOURCES = 64
static

Definition at line 14 of file addrman.cpp.