A Discrete-Event Network Simulator
API
bench-packets.cc File Reference
#include "ns3/command-line.h"
#include "ns3/packet-metadata.h"
#include "ns3/packet.h"
#include "ns3/system-wall-clock-ms.h"
#include <algorithm>
#include <iostream>
#include <limits>
#include <sstream>
#include <stdlib.h>
#include <string>
+ Include dependency graph for bench-packets.cc:

Go to the source code of this file.

Classes

class  BenchHeader< N >
 BenchHeader class used for benchmarking packet serialization/deserialization. More...
 
class  BenchTag< N >
 BenchTag class used for benchmarking packet serialization/deserialization. More...
 

Functions

static void benchA (uint32_t n)
 
static void benchB (uint32_t n)
 
static void benchByteTags (uint32_t n)
 
static void benchC (uint32_t n)
 
static void benchD (uint32_t n)
 
static void benchFragment (uint32_t n)
 
static void C1 (Ptr< Packet > p)
 
static void C2 (Ptr< Packet > p)
 
static void runBench (void(*bench)(uint32_t), uint32_t n, uint32_t minIterations, const char *name)
 
static uint64_t runBenchOneIteration (void(*bench)(uint32_t), uint32_t n)
 

Function Documentation

◆ benchA()

static void benchA ( uint32_t  n)
static

Definition at line 241 of file bench-packets.cc.

References ns3::Packet::AddHeader(), ns3::Packet::Copy(), nsclick-simple-lan::ipv4, NS_ASSERT_MSG, and ns3::Packet::RemoveHeader().

+ Here is the call graph for this function:

◆ benchB()

static void benchB ( uint32_t  n)
static

Definition at line 262 of file bench-packets.cc.

References ns3::Packet::AddHeader(), and nsclick-simple-lan::ipv4.

+ Here is the call graph for this function:

◆ benchByteTags()

static void benchByteTags ( uint32_t  n)
static

Definition at line 336 of file bench-packets.cc.

References ns3::Packet::AddAtEnd(), and ns3::Packet::AddByteTag().

+ Here is the call graph for this function:

◆ benchC()

static void benchC ( uint32_t  n)
static

Definition at line 292 of file bench-packets.cc.

References ns3::Packet::AddHeader(), C1(), and nsclick-simple-lan::ipv4.

+ Here is the call graph for this function:

◆ benchD()

static void benchD ( uint32_t  n)
static

◆ benchFragment()

static void benchFragment ( uint32_t  n)
static

Definition at line 307 of file bench-packets.cc.

References ns3::Packet::AddAtEnd(), ns3::Packet::AddHeader(), ns3::Packet::CreateFragment(), nsclick-simple-lan::ipv4, and ns3::Packet::RemoveHeader().

+ Here is the call graph for this function:

◆ C1()

static void C1 ( Ptr< Packet p)
static

Definition at line 284 of file bench-packets.cc.

References C2(), nsclick-simple-lan::ipv4, and ns3::Packet::RemoveHeader().

Referenced by benchC().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ C2()

static void C2 ( Ptr< Packet p)
static

Definition at line 276 of file bench-packets.cc.

References ns3::Packet::RemoveHeader().

Referenced by C1().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ runBench()

static void runBench ( void(*)(uint32_t)  bench,
uint32_t  n,
uint32_t  minIterations,
const char *  name 
)
static

Definition at line 364 of file bench-packets.cc.

References max, min, and runBenchOneIteration().

+ Here is the call graph for this function:

◆ runBenchOneIteration()

static uint64_t runBenchOneIteration ( void(*)(uint32_t)  bench,
uint32_t  n 
)
static

Definition at line 354 of file bench-packets.cc.

References ns3::SystemWallClockMs::End(), and ns3::SystemWallClockMs::Start().

Referenced by runBench().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: