IPv4 Deduplication Performance Test. More...
Public Member Functions | |
Ipv4DeduplicationPerformanceTest () | |
void | DoRun () override |
Implementation to actually run this TestCase. | |
Public Member Functions inherited from ns3::TestCase | |
TestCase (const TestCase &)=delete | |
virtual | ~TestCase () |
Destructor. | |
std::string | GetName () const |
TestCase & | operator= (const TestCase &)=delete |
Private Member Functions | |
void | DoSendData (Ptr< Socket > socket, Address to, uint8_t socketIndex) |
Send data. | |
Private Attributes | |
std::vector< Ptr< Socket > > | m_sockets |
sockets in use | |
uint8_t | m_target |
number of packets to transmit on each socket | |
std::vector< uint8_t > | m_txPackets |
transmitted packets for each socket | |
Additional Inherited Members | |
Public Types inherited from ns3::TestCase | |
enum | TestDuration { QUICK = 1 , EXTENSIVE = 2 , TAKES_FOREVER = 3 } |
How long the test takes to execute. More... | |
Protected Member Functions inherited from ns3::TestCase | |
TestCase (std::string name) | |
Constructor. | |
void | AddTestCase (TestCase *testCase, TestDuration duration=QUICK) |
Add an individual child TestCase to this test suite. | |
TestCase * | GetParent () const |
Get the parent of this TestCase. | |
bool | IsStatusFailure () const |
Check if any tests failed. | |
bool | IsStatusSuccess () const |
Check if all tests passed. | |
void | SetDataDir (std::string directory) |
Set the data directory where reference trace files can be found. | |
void | ReportTestFailure (std::string cond, std::string actual, std::string limit, std::string message, std::string file, int32_t line) |
Log the failure of this TestCase. | |
bool | MustAssertOnFailure () const |
Check if this run should assert on failure. | |
bool | MustContinueOnFailure () const |
Check if this run should continue on failure. | |
std::string | CreateDataDirFilename (std::string filename) |
Construct the full path to a file in the data directory. | |
std::string | CreateTempDirFilename (std::string filename) |
Construct the full path to a file in a temporary directory. | |
IPv4 Deduplication Performance Test.
This test case sets up a fully connected network of 10 nodes. Each node transmits 2 packets / second for about 20 seconds. Packets are relayed from every receiver. The test outputs the number of events that have been processed during the course of the simulation. Test runtime is also a metric.
The de-duplication cache entry expiration algorithm has evolved from an event-per-expiry (EPE) algorithm to a periodic event, batch purge (PBP) algorithm. The current metrics are taken from tests on the development box. Periodic batch purge period defaults to 1s.
Events Runtime
EVE 656140 29s PBP 337420 29s
Definition at line 594 of file ipv4-deduplication-test.cc.
Ipv4DeduplicationPerformanceTest::Ipv4DeduplicationPerformanceTest | ( | ) |
Definition at line 614 of file ipv4-deduplication-test.cc.
References m_target.
|
overridevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 621 of file ipv4-deduplication-test.cc.
References ns3::Ipv4ListRoutingHelper::Add(), ns3::Ipv4StaticRoutingHelper::AddMulticastRoute(), ns3::Ipv4AddressHelper::Assign(), ns3::NodeContainer::Begin(), ns3::NodeContainer::Create(), ns3::Simulator::Destroy(), DoSendData(), ns3::NodeContainer::End(), ns3::Ipv4Address::GetAny(), ns3::Simulator::GetEventCount(), ns3::NodeContainer::GetN(), ns3::Ipv4StaticRoutingHelper::GetStaticRouting(), ns3::SimpleNetDeviceHelper::Install(), m_sockets, m_txPackets, nodes, NS_LOG_UNCOND, NS_TEST_ASSERT_MSG_EQ, ns3::Simulator::Run(), ns3::Simulator::ScheduleWithContext(), ns3::Seconds(), ns3::Ipv4AddressHelper::SetBase(), and ns3::Config::SetDefault().
|
private |
Send data.
socket | output socket |
to | destination address |
socketIndex | index of the socket |
Definition at line 712 of file ipv4-deduplication-test.cc.
References DoSendData(), m_sockets, m_target, m_txPackets, ns3::Simulator::ScheduleWithContext(), and ns3::Seconds().
Referenced by DoRun(), and DoSendData().
sockets in use
Definition at line 601 of file ipv4-deduplication-test.cc.
Referenced by DoRun(), and DoSendData().
|
private |
number of packets to transmit on each socket
Definition at line 603 of file ipv4-deduplication-test.cc.
Referenced by Ipv4DeduplicationPerformanceTest(), and DoSendData().
|
private |
transmitted packets for each socket
Definition at line 602 of file ipv4-deduplication-test.cc.
Referenced by DoRun(), and DoSendData().