Kea 2.7.5
|
Basic Scenario class. More...
#include <basic_scen.h>
Public Member Functions | |
BasicScen (CommandOptions &options, BasePerfSocket &socket) | |
Default and the only constructor of BasicScen. | |
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 | |
bool | checkExitConditions () |
Check if test exit conditions fulfilled. | |
Protected Attributes | |
RateControl | basic_rate_control_ |
A rate control class for Discover and Solicit messages. | |
RateControl | release_rate_control_ |
A rate control class for Release messages. | |
RateControl | renew_rate_control_ |
A rate control class for Renew messages. | |
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. | |
Basic Scenario class.
This class is used to run the performance test where DHCP server is continuously loaded with DHCP messages according to given rate.
Definition at line 23 of file basic_scen.h.
|
inline |
Default and the only constructor of BasicScen.
options | reference to command options, |
socket | reference to a socket. |
Definition at line 29 of file basic_scen.h.
References basic_rate_control_, isc::perfdhcp::CommandOptions::getRate(), isc::perfdhcp::CommandOptions::getReleaseRate(), isc::perfdhcp::CommandOptions::getRenewRate(), isc::perfdhcp::AbstractScen::options_, release_rate_control_, renew_rate_control_, and isc::perfdhcp::RateControl::setRate().
|
protected |
Check if test exit conditions fulfilled.
Method checks if the test exit conditions are fulfilled. Exit conditions are checked periodically from the main loop. Program should break the main loop when this method returns true. It is calling function responsibility to break main loop gracefully and cleanup after test execution.
Definition at line 24 of file basic_scen.cc.
References isc::perfdhcp::CommandOptions::getMaxDrop(), isc::perfdhcp::CommandOptions::getMaxDropPercentage(), isc::perfdhcp::CommandOptions::getNumRequests(), isc::perfdhcp::CommandOptions::getPeriod(), isc::perfdhcp::TestControl::getStatsMgr(), isc::perfdhcp::TestControl::interrupted(), isc::perfdhcp::AbstractScen::options_, isc::perfdhcp::AbstractScen::stage1_xchg_, isc::perfdhcp::AbstractScen::stage2_xchg_, isc::perfdhcp::AbstractScen::tc_, isc::perfdhcp::CommandOptions::testDiags(), and isc::perfdhcp::TestControl::waitToExit().
Referenced by run().
|
overridevirtual |
brief\ Run performance test.
Method runs whole performance test. Command line options must be parsed prior to running this function. Otherwise function will throw exception.
isc::InvalidOperation | if command line options are not parsed. |
isc::Unexpected | if internal Test Controller error occurred. |
Implements isc::perfdhcp::AbstractScen.
Definition at line 125 of file basic_scen.cc.
References basic_rate_control_, checkExitConditions(), isc::perfdhcp::TestControl::cleanCachedPackets(), isc::perfdhcp::TestControl::consumeReceivedPackets(), isc::dhcp::DHCPRELEASE, isc::dhcp::DHCPREQUEST, DHCPV6_RELEASE, DHCPV6_RENEW, isc::perfdhcp::TestControl::exit_time_, isc::perfdhcp::CommandOptions::getIpVersion(), isc::perfdhcp::RateControl::getOutboundMessageCount(), isc::perfdhcp::CommandOptions::getPreload(), isc::perfdhcp::CommandOptions::getRate(), isc::perfdhcp::CommandOptions::getReleaseRate(), isc::perfdhcp::CommandOptions::getRenewRate(), isc::perfdhcp::CommandOptions::getReportDelay(), isc::perfdhcp::TestControl::getServerId(), isc::perfdhcp::TestControl::getStatsMgr(), isc::perfdhcp::CommandOptions::getWrapped(), isc::perfdhcp::AbstractScen::options_, isc::perfdhcp::TestControl::printIntermediateStats(), isc::perfdhcp::TestControl::printStats(), isc::perfdhcp::TestControl::printTemplates(), release_rate_control_, renew_rate_control_, isc::perfdhcp::TestControl::runWrapped(), isc::perfdhcp::TestControl::sendMultipleMessages4(), isc::perfdhcp::TestControl::sendMultipleMessages6(), isc::perfdhcp::TestControl::sendPackets(), isc::perfdhcp::TestControl::serverIdReceived(), isc::perfdhcp::TestControl::start(), isc::perfdhcp::TestControl::stop(), isc::perfdhcp::AbstractScen::tc_, and isc::perfdhcp::CommandOptions::testDiags().
|
protected |
A rate control class for Discover and Solicit messages.
Definition at line 50 of file basic_scen.h.
Referenced by BasicScen(), and run().
|
protected |
A rate control class for Release messages.
Definition at line 54 of file basic_scen.h.
Referenced by BasicScen(), and run().
|
protected |
A rate control class for Renew messages.
Definition at line 52 of file basic_scen.h.
Referenced by BasicScen(), and run().