A Discrete-Event Network Simulator
API
Classes | Functions
bench-packets.cc File Reference
#include "ns3/command-line.h"
#include "ns3/system-wall-clock-ms.h"
#include "ns3/packet.h"
#include "ns3/packet-metadata.h"
#include <iostream>
#include <sstream>
#include <string>
#include <stdlib.h>
#include <limits>
#include <algorithm>

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, char const *name)
 
static uint64_t runBenchOneIteration (void(*bench)(uint32_t), uint32_t n)
 

Function Documentation

◆ benchA()

static void benchA ( uint32_t  n)
static

◆ benchB()

static void benchB ( uint32_t  n)
static

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

References ns3::Packet::AddHeader(), and sample-rng-plot::n.

◆ benchByteTags()

static void benchByteTags ( uint32_t  n)
static

◆ benchC()

static void benchC ( uint32_t  n)
static

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

References ns3::Packet::AddHeader(), C1(), and sample-rng-plot::n.

◆ benchD()

static void benchD ( uint32_t  n)
static

◆ benchFragment()

static void benchFragment ( uint32_t  n)
static

◆ C1()

static void C1 ( Ptr< Packet p)
static

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

References C2(), and ns3::Packet::RemoveHeader().

Referenced by benchC().

◆ C2()

static void C2 ( Ptr< Packet p)
static

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

References ns3::Packet::RemoveHeader().

Referenced by C1().

◆ runBench()

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

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

References max, min, sample-rng-plot::n, and runBenchOneIteration().

◆ runBenchOneIteration()

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