Kea 2.5.8
isc::perfdhcp::AvalancheScen Class Reference

Avalanche Scenario class. More...

#include <avalanche_scen.h>

+ Inheritance diagram for isc::perfdhcp::AvalancheScen:

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.
 
virtual int run ()=0
 Run performance test.
 

Protected Member Functions

int resendPackets (ExchangeType xchg_type)
 \brief Resend packets.
 

Protected Attributes

std::unordered_map< ExchangeType, std::unordered_map< uint32_t, int >, EnumClassHashretransmissions_
 A map xchg type -> (a map of trans id -> retransmissions count.
 
BasePerfSocketsocket_
 
std::unordered_map< ExchangeType, std::unordered_map< uint32_t, boost::posix_time::ptime >, EnumClassHashstart_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
CommandOptionsoptions_
 Reference to commandline options.
 
ExchangeType stage1_xchg_
 
ExchangeType stage2_xchg_
 
TestControl tc_
 Object for controlling sending and receiving packets.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ AvalancheScen()

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

Default and the only constructor of AvalancheScen.

Parameters
optionsreference to command options,
socketreference to a socket.

Definition at line 43 of file avalanche_scen.h.

Member Function Documentation

◆ resendPackets()

int isc::perfdhcp::AvalancheScen::resendPackets ( ExchangeType  xchg_type)
protected

\brief Resend packets.

It resends packets for given exchange type that did not receive a response yet.

Parameters
xchg_typeexchange type that should be looked for.
Returns
number of packets still waiting for resending.

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().

+ Here is the call graph for this function:

◆ run()

Member Data Documentation

◆ retransmissions_

std::unordered_map<ExchangeType, std::unordered_map<uint32_t, int>, EnumClassHash> isc::perfdhcp::AvalancheScen::retransmissions_
protected

A map xchg type -> (a map of trans id -> retransmissions count.

Definition at line 61 of file avalanche_scen.h.

Referenced by resendPackets().

◆ socket_

BasePerfSocket& isc::perfdhcp::AvalancheScen::socket_
protected

Definition at line 58 of file avalanche_scen.h.

Referenced by resendPackets().

◆ start_times_

std::unordered_map<ExchangeType, std::unordered_map<uint32_t, boost::posix_time::ptime>, EnumClassHash> isc::perfdhcp::AvalancheScen::start_times_
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().

◆ total_resent_

int isc::perfdhcp::AvalancheScen::total_resent_
protected

Total number of resent packets.

Definition at line 66 of file avalanche_scen.h.

Referenced by resendPackets(), and run().


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