Kea  1.9.9-git
isc::perfdhcp::BasicScen Class Reference

Basic Scenario class. More...

#include <basic_scen.h>

+ Inheritance diagram for isc::perfdhcp::BasicScen:

Public Member Functions

 BasicScen (CommandOptions &options, BasePerfSocket &socket)
 Default and the only constructor of BasicScen. More...
 
int run () override
 brief\ Run performance test. More...
 
- Public Member Functions inherited from isc::perfdhcp::AbstractScen
 AbstractScen (CommandOptions &options, BasePerfSocket &socket)
 Default and the only constructor of AbstractScen. More...
 
virtual ~AbstractScen ()
 Trivial virtual destructor. More...
 

Protected Member Functions

bool checkExitConditions ()
 Check if test exit conditions fulfilled. More...
 

Protected Attributes

RateControl basic_rate_control_
 A rate control class for Discover and Solicit messages. More...
 
RateControl release_rate_control_
 A rate control class for Release messages. More...
 
RateControl renew_rate_control_
 A rate control class for Renew messages. More...
 
- Protected Attributes inherited from isc::perfdhcp::AbstractScen
CommandOptionsoptions_
 Reference to commandline options. More...
 
ExchangeType stage1_xchg_
 
ExchangeType stage2_xchg_
 
TestControl tc_
 Object for controlling sending and receiving packets. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

isc::perfdhcp::BasicScen::BasicScen ( CommandOptions options,
BasePerfSocket socket 
)
inline

Default and the only constructor of BasicScen.

Parameters
optionsreference to command options,
socketreference 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().

+ Here is the call graph for this function:

Member Function Documentation

bool isc::perfdhcp::BasicScen::checkExitConditions ( )
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.

Returns
true if any of the exit conditions is fulfilled.

Definition at line 25 of file basic_scen.cc.

int isc::perfdhcp::BasicScen::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.

Exceptions
isc::InvalidOperationif command line options are not parsed.
isc::Unexpectedif internal Test Controller error occurred.
Returns
execution status.
Todo:
: need to implement adaptive time here, so the sleep time is not fixed, but adjusts to current situation.

Implements isc::perfdhcp::AbstractScen.

Definition at line 126 of file basic_scen.cc.

References DHCPV6_RELEASE, DHCPV6_RENEW, and isc::perfdhcp::StatsMgr::incrementCounter().

Referenced by main().

+ Here is the call graph for this function:

Member Data Documentation

RateControl isc::perfdhcp::BasicScen::basic_rate_control_
protected

A rate control class for Discover and Solicit messages.

Definition at line 50 of file basic_scen.h.

Referenced by BasicScen().

RateControl isc::perfdhcp::BasicScen::release_rate_control_
protected

A rate control class for Release messages.

Definition at line 54 of file basic_scen.h.

Referenced by BasicScen().

RateControl isc::perfdhcp::BasicScen::renew_rate_control_
protected

A rate control class for Renew messages.

Definition at line 52 of file basic_scen.h.

Referenced by BasicScen().


The documentation for this class was generated from the following files: