A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
bench-scheduler.cc File Reference
#include "ns3/core-module.h"
#include <cmath>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <string.h>
#include <vector>
+ Include dependency graph for bench-scheduler.cc:

Go to the source code of this file.

Classes

class  Bench
 Benchmark instance which can do a single run. More...
 
class  BenchSuite
 Benchmark which performs an ensemble of runs. More...
 
struct  BenchSuite::PhaseResult
 Statistics from a single phase, init or run. More...
 
struct  Bench::Result
 The output. More...
 
struct  BenchSuite::Result
 Results from initialization and execution of a single run. More...
 

Macros

#define ACCUMULATE(phase, field)
 
#define DEB(x)
 Log debugging output.
 
#define LOG(x)   std::cout << x << std::endl
 Log to std::cout.
 
#define LOGME(x)   LOG(g_me << x)
 Log with program name prefix.
 

Functions

Ptr< RandomVariableStreamGetRandomStream (std::string filename)
 Create a RandomVariableStream to generate next event delays.
 

Variables

bool g_debug = false
 Flag to write debugging output.
 
int g_fwidth = 6
 Output field width for numeric data.
 
std::string g_me
 Name of this program.
 

Macro Definition Documentation

◆ ACCUMULATE

#define ACCUMULATE (   phase,
  field 
)
Value:
deltaPre = run.phase.field - average.phase.field; \
average.phase.field += deltaPre / count; \
deltaPost = run.phase.field - average.phase.field; \
moment2.phase.field += deltaPre * deltaPost

◆ DEB

#define DEB (   x)
Value:
if (g_debug) \
{ \
LOGME(x); \
}
bool g_debug
Flag to write debugging output.

Log debugging output.

Definition at line 41 of file bench-scheduler.cc.

◆ LOG

#define LOG (   x)    std::cout << x << std::endl

Log to std::cout.

Definition at line 37 of file bench-scheduler.cc.

◆ LOGME

#define LOGME (   x)    LOG(g_me << x)

Log with program name prefix.

Definition at line 39 of file bench-scheduler.cc.

Function Documentation

◆ GetRandomStream()

Ptr< RandomVariableStream > GetRandomStream ( std::string  filename)

Create a RandomVariableStream to generate next event delays.

If the filename parameter is empty a default exponential time distribution will be used, with mean delay of 100 ns.

If the filename is - standard input will be used.

Parameters
[in]filenameThe delay interval source file name.
Returns
The RandomVariableStream.

Definition at line 402 of file bench-scheduler.cc.

References LOG.

Variable Documentation

◆ g_debug

bool g_debug = false

Flag to write debugging output.

Definition at line 32 of file bench-scheduler.cc.

◆ g_fwidth

int g_fwidth = 6

Output field width for numeric data.

Definition at line 48 of file bench-scheduler.cc.

Referenced by BenchSuite::Header(), and BenchSuite::Result::Log().

◆ g_me

std::string g_me

Name of this program.

Definition at line 35 of file bench-scheduler.cc.