MoonGen
 All Files Functions Variables Pages
stats.lua File Reference

Stats ... More...

Go to the source code of this file.

Functions

local function newCounter (ctrType, name, dev, format, file)
 base constructor for rx and tx counters
 
function mod newDevRxCounter (name, dev, format, file)
 Create a new rx counter using device statistics registers. More...
 
function mod newPktRxCounter (name, format, file)
 Create a new rx counter that can be updated by passing packet buffers to it. More...
 
function mod newManualRxCounter (name, format, file)
 Create a new rx counter that has to be updated manually. More...
 
function rxCounter finalize (sleep)
 Base class.
 
function rxCounter update ()
 Device-based counter.
 
function rxCounter getStats ()
 Get accumulated statistics. More...
 
function devRxCounter getThroughput ()
 Device-based counter.
 
function pktRxCounter countPacket (buf)
 Packet-based counter.
 
function manualRxCounter update (pkts, bytes)
 Manual rx counter.
 
function mod newDevTxCounter (name, dev, format, file)
 Create a new tx counter using device statistics registers. More...
 
function mod newPktTxCounter (name, format, file)
 Create a new tx counter that can be updated by passing packet buffers to it. More...
 
function mod newManualTxCounter (name, format, file)
 Create a new tx counter that has to be updated manually. More...
 

Detailed Description

Stats ...

Todo:
TODO docu

Definition in file stats.lua.

Function Documentation

function txCounter getStats ( )

Get accumulated statistics.

Calculat the average throughput.

function mod newDevRxCounter ( name  ,
dev  ,
format  ,
file   
)

Create a new rx counter using device statistics registers.

Parameters
namethe name of the counter, included in the output. defaults to the device name
devthe device to track
formatthe output format, "CSV" (default) and "plain" are currently supported
filethe output file, defaults to standard out
Examples:
l2-poisson-load-latency.lua.
function mod newDevTxCounter ( name  ,
dev  ,
format  ,
file   
)

Create a new tx counter using device statistics registers.

Parameters
namethe name of the counter, included in the output. defaults to the device name
devthe device to track
formatthe output format, "CSV" (default) and "plain" are currently supported
filethe output file, defaults to standard out
Examples:
l3-tcp-syn-flood.lua.
function mod newManualRxCounter ( name  ,
format  ,
file   
)

Create a new rx counter that has to be updated manually.

Parameters
namethe name of the counter, included in the output
formatthe output format, "CSV" (default) and "plain" are currently supported
filethe output file, defaults to standard out
function mod newManualTxCounter ( name  ,
format  ,
file   
)

Create a new tx counter that has to be updated manually.

Parameters
namethe name of the counter, included in the output
formatthe output format, "CSV" (default) and "plain" are currently supported
filethe output file, defaults to standard out
Examples:
l2-poisson-load-latency.lua, and quality-of-service-test.lua.
function mod newPktRxCounter ( name  ,
format  ,
file   
)

Create a new rx counter that can be updated by passing packet buffers to it.

Parameters
namethe name of the counter, included in the output
formatthe output format, "CSV" (default) and "plain" are currently supported
filethe output file, defaults to standard out
Examples:
quality-of-service-test.lua.
function mod newPktTxCounter ( name  ,
format  ,
file   
)

Create a new tx counter that can be updated by passing packet buffers to it.

Parameters
namethe name of the counter, included in the output
formatthe output format, "CSV" (default) and "plain" are currently supported
filethe output file, defaults to standard out