Kea 2.7.6
|
Avalanche Scenario class. More...
#include <avalanche_scen.h>
Public Member Functions | |
AvalancheScen (CommandOptions &options, BasePerfSocket &socket) | |
Default and the only constructor of AvalancheScen. | |
int | run () override |
brief\ Run performance test. | |
Public Member Functions inherited from isc::perfdhcp::AbstractScen | |
AbstractScen (CommandOptions &options, BasePerfSocket &socket) | |
Default and the only constructor of AbstractScen. | |
virtual | ~AbstractScen () |
Trivial virtual destructor. | |
Protected Member Functions | |
int | resendPackets (ExchangeType xchg_type) |
\brief Resend packets. | |
Protected Attributes | |
std::unordered_map< ExchangeType, std::unordered_map< uint32_t, int >, EnumClassHash > | retransmissions_ |
A map xchg type -> (a map of trans id -> retransmissions count. | |
BasePerfSocket & | socket_ |
std::unordered_map< ExchangeType, std::unordered_map< uint32_t, boost::posix_time::ptime >, EnumClassHash > | start_times_ |
A map xchg type -> (a map of trans id -> time of sending first packet. | |
int | total_resent_ |
Total number of resent packets. | |
Protected Attributes inherited from isc::perfdhcp::AbstractScen | |
CommandOptions & | options_ |
Reference to commandline options. | |
ExchangeType | stage1_xchg_ |
ExchangeType | stage2_xchg_ |
TestControl | tc_ |
Object for controlling sending and receiving packets. | |
Avalanche Scenario class.
This class is used to run the performance test where DHCP server is first loaded with indicated buffer of Discover or Solicit messages and then the class is waiting till receiving all required responses. Full DORA and SARR message sequences are expected.
Definition at line 37 of file avalanche_scen.h.
|
inline |
Default and the only constructor of AvalancheScen.
options | reference to command options, |
socket | reference to a socket. |
Definition at line 43 of file avalanche_scen.h.
|
protected |
\brief Resend packets.
It resends packets for given exchange type that did not receive a response yet.
xchg_type | exchange type that should be looked for. |
Definition at line 24 of file avalanche_scen.cc.
References isc::perfdhcp::CommandOptions::getIpVersion(), isc::perfdhcp::StatsMgr::getSentPackets(), isc::perfdhcp::TestControl::getStatsMgr(), isc::perfdhcp::AbstractScen::options_, retransmissions_, isc::perfdhcp::BasePerfSocket::send(), socket_, start_times_, isc::perfdhcp::AbstractScen::tc_, and total_resent_.
Referenced by run().
|
overridevirtual |
brief\ Run performance test.
Method runs whole performance test.
Implements isc::perfdhcp::AbstractScen.
Definition at line 97 of file avalanche_scen.cc.
References isc::perfdhcp::TestControl::consumeReceivedPackets(), isc::perfdhcp::CommandOptions::DORA_SARR, isc::perfdhcp::CommandOptions::getClientsNum(), isc::perfdhcp::CommandOptions::getExchangeMode(), isc::perfdhcp::StatsMgr::getRcvdPacketsNum(), isc::perfdhcp::StatsMgr::getSentPacketsNum(), isc::perfdhcp::TestControl::getServerId(), isc::perfdhcp::TestControl::getStatsMgr(), isc::perfdhcp::TestControl::interrupted(), isc::perfdhcp::AbstractScen::options_, isc::perfdhcp::StatsMgr::printLeases(), isc::perfdhcp::TestControl::printStats(), isc::perfdhcp::StatsMgr::printTimestamps(), resendPackets(), isc::perfdhcp::TestControl::sendPackets(), isc::perfdhcp::TestControl::serverIdReceived(), isc::perfdhcp::AbstractScen::stage1_xchg_, isc::perfdhcp::AbstractScen::stage2_xchg_, isc::perfdhcp::TestControl::start(), isc::perfdhcp::TestControl::stop(), isc::perfdhcp::AbstractScen::tc_, isc::perfdhcp::CommandOptions::testDiags(), and total_resent_.
Referenced by main().
|
protected |
A map xchg type -> (a map of trans id -> retransmissions count.
Definition at line 61 of file avalanche_scen.h.
Referenced by resendPackets().
|
protected |
Definition at line 58 of file avalanche_scen.h.
Referenced by resendPackets().
|
protected |
A map xchg type -> (a map of trans id -> time of sending first packet.
Definition at line 63 of file avalanche_scen.h.
Referenced by resendPackets().
|
protected |
Total number of resent packets.
Definition at line 66 of file avalanche_scen.h.
Referenced by resendPackets(), and run().