Kea
1.9.9-git
|
A base class for a fixture for specific lease manager benchmarks. More...
#include <generic_lease_mgr_benchmark.h>
Public Types | |
enum | Universe { V4, V6 } |
Specifies the IP protocol family to be bested. More... | |
Public Member Functions | |
GenericLeaseMgrBenchmark () | |
Constructor. More... | |
virtual | ~GenericLeaseMgrBenchmark () |
Virtual destructor. More... | |
void | benchGetExpiredLeases4 () |
This step retrieves all expired IPv4 leases. More... | |
void | benchGetExpiredLeases6 () |
This step retrieves all expired IPv6 leases. More... | |
void | benchGetLease4_address () |
This step retrieves IPv4 leases by IP address. More... | |
void | benchGetLease4_clientid () |
This step retrieves IPv4 leases by client-id. More... | |
void | benchGetLease4_clientid_subnetid () |
This step retrieves IPv4 leases by (client-id, subnet-id) tuple. More... | |
void | benchGetLease4_hwaddr () |
This step retrieves IPv4 leases by hardware address. More... | |
void | benchGetLease4_hwaddr_subnetid () |
This step retrieves IPv4 leases by (hwaddr, subnet-id) tuple. More... | |
void | benchGetLease6_type_address () |
This step retrieves IPv6 leases by IP address. More... | |
void | benchGetLease6_type_duid_iaid () |
This step retrieves IPv6 leases by (type, duid, iaid) tuple. More... | |
void | benchGetLease6_type_duid_iaid_subnetid () |
This step retrieves IPv6 leases by (type, duid, iaid, subnet-id) tuple. More... | |
void | benchInsertLeases4 () |
This step inserts all IPv4 leases stored in lease4_ into the LeaseMgr. More... | |
void | benchInsertLeases6 () |
This step inserts all IPv6 leases stored in lease6_ into the LeaseMgr. More... | |
void | benchUpdateLeases4 () |
This step updates all IPv4 leases stored in lease4_ in the LeaseMgr. More... | |
void | benchUpdateLeases6 () |
This step updates all IPv6 leases stored in lease6_ in the LeaseMgr. More... | |
void | prepareLeases4 (size_t const &lease_count) |
Prepares specified number of IPv4 leases. More... | |
void | prepareLeases6 (size_t const &lease_count) |
Prepares specified number of IPv6 leases. More... | |
void | setUp4 (::benchmark::State &state, size_t const &lease_count) |
set up code for initializing IPv4 version of a benchmark More... | |
void | setUp6 (::benchmark::State &state, size_t const &lease_count) |
set up code for initializing IPv6 version of a benchmark More... | |
void | setUpWithInserts4 (::benchmark::State &state, size_t const &lease_count) |
set up code (with lease preinsertion) for initializing IPv4 version of a benchmark. More... | |
void | setUpWithInserts6 (::benchmark::State &state, size_t const &lease_count) |
set up code (with lease preinsertion) for initializing IPv6 version of a benchmark. More... | |
Public Attributes | |
Lease4Collection | leases4_ |
List of IPv4 leases (useful during benchmarks) More... | |
Lease6Collection | leases6_ |
List of IPv6 leases (useful during benchmarks) More... | |
LeaseMgr * | lmptr_ |
Pointer to the lease manager being under evaluation. More... | |
A base class for a fixture for specific lease manager benchmarks.
Definition at line 30 of file generic_lease_mgr_benchmark.h.
Specifies the IP protocol family to be bested.
Enumerator | |
---|---|
V4 | |
V6 |
Definition at line 33 of file generic_lease_mgr_benchmark.h.
isc::dhcp::bench::GenericLeaseMgrBenchmark::GenericLeaseMgrBenchmark | ( | ) |
Constructor.
Definition at line 37 of file generic_lease_mgr_benchmark.cc.
|
virtual |
Virtual destructor.
Definition at line 40 of file generic_lease_mgr_benchmark.cc.
void isc::dhcp::bench::GenericLeaseMgrBenchmark::benchGetExpiredLeases4 | ( | ) |
This step retrieves all expired IPv4 leases.
Definition at line 147 of file generic_lease_mgr_benchmark.cc.
References isc::dhcp::LeaseMgr::getExpiredLeases4(), leases4_, and lmptr_.
void isc::dhcp::bench::GenericLeaseMgrBenchmark::benchGetExpiredLeases6 | ( | ) |
This step retrieves all expired IPv6 leases.
Definition at line 220 of file generic_lease_mgr_benchmark.cc.
References isc::dhcp::LeaseMgr::getExpiredLeases6(), leases6_, and lmptr_.
void isc::dhcp::bench::GenericLeaseMgrBenchmark::benchGetLease4_address | ( | ) |
This step retrieves IPv4 leases by IP address.
Definition at line 112 of file generic_lease_mgr_benchmark.cc.
References isc::dhcp::LeaseMgr::getLease4(), leases4_, and lmptr_.
void isc::dhcp::bench::GenericLeaseMgrBenchmark::benchGetLease4_clientid | ( | ) |
This step retrieves IPv4 leases by client-id.
Definition at line 133 of file generic_lease_mgr_benchmark.cc.
References isc::dhcp::LeaseMgr::getLease4(), leases4_, and lmptr_.
void isc::dhcp::bench::GenericLeaseMgrBenchmark::benchGetLease4_clientid_subnetid | ( | ) |
This step retrieves IPv4 leases by (client-id, subnet-id) tuple.
Definition at line 140 of file generic_lease_mgr_benchmark.cc.
References isc::dhcp::LeaseMgr::getLease4(), leases4_, and lmptr_.
void isc::dhcp::bench::GenericLeaseMgrBenchmark::benchGetLease4_hwaddr | ( | ) |
This step retrieves IPv4 leases by hardware address.
Definition at line 119 of file generic_lease_mgr_benchmark.cc.
References isc::dhcp::LeaseMgr::getLease4(), leases4_, and lmptr_.
void isc::dhcp::bench::GenericLeaseMgrBenchmark::benchGetLease4_hwaddr_subnetid | ( | ) |
This step retrieves IPv4 leases by (hwaddr, subnet-id) tuple.
Definition at line 126 of file generic_lease_mgr_benchmark.cc.
References isc::dhcp::LeaseMgr::getLease4(), leases4_, and lmptr_.
void isc::dhcp::bench::GenericLeaseMgrBenchmark::benchGetLease6_type_address | ( | ) |
This step retrieves IPv6 leases by IP address.
Definition at line 198 of file generic_lease_mgr_benchmark.cc.
References isc::dhcp::LeaseMgr::getLease6(), leases6_, and lmptr_.
void isc::dhcp::bench::GenericLeaseMgrBenchmark::benchGetLease6_type_duid_iaid | ( | ) |
This step retrieves IPv6 leases by (type, duid, iaid) tuple.
Definition at line 205 of file generic_lease_mgr_benchmark.cc.
References isc::dhcp::LeaseMgr::getLeases6(), leases6_, and lmptr_.
void isc::dhcp::bench::GenericLeaseMgrBenchmark::benchGetLease6_type_duid_iaid_subnetid | ( | ) |
This step retrieves IPv6 leases by (type, duid, iaid, subnet-id) tuple.
Definition at line 212 of file generic_lease_mgr_benchmark.cc.
References isc::dhcp::LeaseMgr::getLease6(), leases6_, and lmptr_.
void isc::dhcp::bench::GenericLeaseMgrBenchmark::benchInsertLeases4 | ( | ) |
This step inserts all IPv4 leases stored in lease4_ into the LeaseMgr.
Definition at line 98 of file generic_lease_mgr_benchmark.cc.
References isc::dhcp::LeaseMgr::addLease(), leases4_, and lmptr_.
Referenced by setUpWithInserts4().
void isc::dhcp::bench::GenericLeaseMgrBenchmark::benchInsertLeases6 | ( | ) |
This step inserts all IPv6 leases stored in lease6_ into the LeaseMgr.
Definition at line 184 of file generic_lease_mgr_benchmark.cc.
References isc::dhcp::LeaseMgr::addLease(), leases6_, and lmptr_.
Referenced by setUpWithInserts6().
void isc::dhcp::bench::GenericLeaseMgrBenchmark::benchUpdateLeases4 | ( | ) |
This step updates all IPv4 leases stored in lease4_ in the LeaseMgr.
Definition at line 105 of file generic_lease_mgr_benchmark.cc.
References leases4_, lmptr_, and isc::dhcp::LeaseMgr::updateLease4().
void isc::dhcp::bench::GenericLeaseMgrBenchmark::benchUpdateLeases6 | ( | ) |
This step updates all IPv6 leases stored in lease6_ in the LeaseMgr.
Definition at line 191 of file generic_lease_mgr_benchmark.cc.
References leases6_, lmptr_, and isc::dhcp::LeaseMgr::updateLease6().
void isc::dhcp::bench::GenericLeaseMgrBenchmark::prepareLeases4 | ( | size_t const & | lease_count | ) |
Prepares specified number of IPv4 leases.
The leases are stored in leases4_ container.
lease_count | specifies the number of leases to be created. |
Definition at line 80 of file generic_lease_mgr_benchmark.cc.
References isc::dhcp::HTYPE_ETHER, and leases4_.
Referenced by setUp4(), and setUpWithInserts4().
void isc::dhcp::bench::GenericLeaseMgrBenchmark::prepareLeases6 | ( | size_t const & | lease_count | ) |
Prepares specified number of IPv6 leases.
The leases are stored in leases6_ container.
lease_count | specifies the number of leases to be created. |
Definition at line 153 of file generic_lease_mgr_benchmark.cc.
References leases6_.
Referenced by setUp6(), and setUpWithInserts6().
void isc::dhcp::bench::GenericLeaseMgrBenchmark::setUp4 | ( | ::benchmark::State & | state, |
size_t const & | lease_count | ||
) |
set up code for initializing IPv4 version of a benchmark
state | state to be passed to SetUp |
lease_count | number of leases to be tested |
Definition at line 44 of file generic_lease_mgr_benchmark.cc.
References prepareLeases4().
void isc::dhcp::bench::GenericLeaseMgrBenchmark::setUp6 | ( | ::benchmark::State & | state, |
size_t const & | lease_count | ||
) |
set up code for initializing IPv6 version of a benchmark
state | state to be passed to SetUp |
lease_count | number of leases to be tested |
Definition at line 62 of file generic_lease_mgr_benchmark.cc.
References prepareLeases6().
void isc::dhcp::bench::GenericLeaseMgrBenchmark::setUpWithInserts4 | ( | ::benchmark::State & | state, |
size_t const & | lease_count | ||
) |
set up code (with lease preinsertion) for initializing IPv4 version of a benchmark.
state | state to be passed to SetUp |
lease_count | number of leases to be tested |
Definition at line 52 of file generic_lease_mgr_benchmark.cc.
References benchInsertLeases4(), and prepareLeases4().
void isc::dhcp::bench::GenericLeaseMgrBenchmark::setUpWithInserts6 | ( | ::benchmark::State & | state, |
size_t const & | lease_count | ||
) |
set up code (with lease preinsertion) for initializing IPv6 version of a benchmark.
state | state to be passed to SetUp |
lease_count | number of leases to be tested |
Definition at line 70 of file generic_lease_mgr_benchmark.cc.
References benchInsertLeases6(), and prepareLeases6().
Lease4Collection isc::dhcp::bench::GenericLeaseMgrBenchmark::leases4_ |
List of IPv4 leases (useful during benchmarks)
Definition at line 125 of file generic_lease_mgr_benchmark.h.
Referenced by benchGetExpiredLeases4(), benchGetLease4_address(), benchGetLease4_clientid(), benchGetLease4_clientid_subnetid(), benchGetLease4_hwaddr(), benchGetLease4_hwaddr_subnetid(), benchInsertLeases4(), benchUpdateLeases4(), and prepareLeases4().
Lease6Collection isc::dhcp::bench::GenericLeaseMgrBenchmark::leases6_ |
List of IPv6 leases (useful during benchmarks)
Definition at line 128 of file generic_lease_mgr_benchmark.h.
Referenced by benchGetExpiredLeases6(), benchGetLease6_type_address(), benchGetLease6_type_duid_iaid(), benchGetLease6_type_duid_iaid_subnetid(), benchInsertLeases6(), benchUpdateLeases6(), and prepareLeases6().
LeaseMgr* isc::dhcp::bench::GenericLeaseMgrBenchmark::lmptr_ |
Pointer to the lease manager being under evaluation.
Definition at line 122 of file generic_lease_mgr_benchmark.h.
Referenced by benchGetExpiredLeases4(), benchGetExpiredLeases6(), benchGetLease4_address(), benchGetLease4_clientid(), benchGetLease4_clientid_subnetid(), benchGetLease4_hwaddr(), benchGetLease4_hwaddr_subnetid(), benchGetLease6_type_address(), benchGetLease6_type_duid_iaid(), benchGetLease6_type_duid_iaid_subnetid(), benchInsertLeases4(), benchInsertLeases6(), benchUpdateLeases4(), and benchUpdateLeases6().