FlowMeasurementRecorder

Package: inet.queueing.flow

simple module FlowMeasurementRecorder

Part of the flow measurement infrastructure. It can be used to record the collected statistics and also to terminate the flow measurements.

The flow measurement statistics are collected for every bit individually. The measurement starts from the moment the bit enters the flow and continues up to the point where the bit exits the flow. The collected statistics can be recorded multiple times during this time. The flow measurement tracks bits individually using their unique identity.

See also: FlowMeasurementStarter

inet.queueing.flow.FlowMeasurementRecorderFlowMeasurementRecordersimple

Usage diagram

Inheritance diagram

Used in compound modules

Name

Type

Description

MeasurementLayer

compound module

(no description)

MultiMeasurementLayer

compound module

(no description)

Extends

Name

Type

Description

PacketFlowBase

simple module

Base module for various packet flow modules. A packet flow module passes or streams all pushed or pulled packets after processing them from its input to its output.

Parameters

Name

Type

Default value

Description

displayStringTextFormat

string

“processed {numProcessedPackets} pk ({processedTotalLength})”

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

packetFilter

object

“*”

Which packets are considered, matches all packets by default

offset

int

0b

Designates the packet part to be measured

length

int

-1b

Designates the packet part to be measured

flowName

string

“”

Use packet flow to separate measurement from other measurements

measure

string

“not packetEvent”

Match expression for a combination of: packetEvent, elapsedTime, delayingTime, queueingTime, processingTime, transmissionTime, propagationTime

endMeasurement

bool

true

packetEventFileName

string

“${resultdir}/${configname}-” + fullPath() + “-packetEvent.json”

Properties

Name

Value

Description

class

FlowMeasurementRecorder

display

i=block/timer

Gates

Name

Direction

Size

Description

in

input

out

output

Signals

Name

Type

Unit

Description

packetFlowEnded

inet::Packet

packetFlowMeasured

inet::Packet

packetPulledIn

inet::Packet

packetPulledOut

inet::Packet

packetPushedIn

inet::Packet

packetPushedOut

inet::Packet

Statistics

Name

Title

Source

Record

Unit

Interpolation Mode

Description

bitElapsedTime

bit elapsed time

weightTimes(lengthWeightedValuePerRegion(elapsedTimePerRegion(demuxFlow(packetFlowMeasured))))

histogram?

s

none

the statistical value is the elapsed time from the moment the bit entered the flow

bitElapsedTimePerRegion

bit elapsed time per region

dropWeight(lengthWeightedValuePerRegion(elapsedTimePerRegion(demuxFlow(packetFlowMeasured))))

vector?,histogram?

s

none

the statistical value (the same for all bits in the region) is the elapsed time from the moment any bit in the region entered the flow

bitLifeTime

bit life time

weightTimes(lengthWeightedValuePerRegion(lifeTimePerRegion(demuxFlow(packetFlowMeasured))))

histogram?

s

none

the statistical value is the time difference of the current simulation time and the creation time of the bit

bitLifeTimePerRegion

bit life time per region

dropWeight(lengthWeightedValuePerRegion(lifeTimePerRegion(demuxFlow(packetFlowMeasured))))

vector?,histogram?

s

none

the statistical value (the same for all bits in the region) is the time difference of the current simulation time and the creation time of any bit in the region

flowDataRate

flow data rate

throughput(packetLength(demuxFlow(packetFlowMeasured)))

vector

bps

linear

the statistic value is the throughput of the measured flow

flowIncomingDataRate

flow specific incoming data rate

throughput(demuxFlow(merge(packetPushedIn, packetPulledIn)))

vector

bps

linear

the statistical value is the flow specific data rate of the incoming packets

flowIncomingPacketLengths

flow specific incoming packet lengths

packetLength(demuxFlow(merge(packetPushedIn, packetPulledIn)))

sum,histogram,vector

b

none

the statistical value is the flow specific length of the incoming packet

flowOutgoingDataRate

flow specific outgoing data rate

throughput(demuxFlow(merge(packetPushedOut, packetPulledOut)))

vector

bps

linear

the statistical value is the flow specific data rate of the outgoing packets

flowOutgoingPacketLengths

flow specific outgoing packet lengths

packetLength(demuxFlow(merge(packetPushedOut, packetPulledOut)))

sum,histogram,vector

b

none

the statistical value is the flow specific length of the outgoing packet

incomingDataRate

incoming data rate

throughput(merge(packetPushedIn, packetPulledIn))

vector

bps

linear

the statistical value is the data rate of the incoming packets

incomingPacketLengths

incoming packet lengths

packetLength(merge(packetPushedIn, packetPulledIn))

sum,histogram,vector

b

none

the statistical value is the length of the incoming packet

incomingPackets

incoming packets

merge(packetPushedIn, packetPulledIn)

count

pk

the statistical value is the incoming packet

meanBitElapsedTimePerPacket

mean bit elapsed time per packet

weightedMeanPerGroup(groupRegionsPerPacket(elapsedTimePerRegion(demuxFlow(packetFlowMeasured))))

vector,histogram

s

none

the statistical value is the elapsed time from the moment any bit in the region entered the flow

meanBitLifeTimePerPacket

mean bit life time per packet

weightedMeanPerGroup(groupRegionsPerPacket(lifeTimePerRegion(demuxFlow(packetFlowMeasured))))

vector,histogram

s

none

the statistical value is the time difference of the current simulation time and the creation time of any bit in the region

meanTotalBitDelayingTimePerPacket

mean total bit delaying time per packet

weightedMeanPerGroup(groupRegionsPerPacket(delayingTimePerRegion(demuxFlow(packetFlowMeasured))))

vector,histogram

s

none

the statistical value is the sum of the delaying time of any bit in the region for all delayers where that particular bit was delayed

meanTotalBitProcessingTimePerPacket

mean total bit processing time per packet

weightedMeanPerGroup(groupRegionsPerPacket(processingTimePerRegion(demuxFlow(packetFlowMeasured))))

vector,histogram

s

none

the statistical value is the sum of the processing time of any bit in the region for all processors where that particular bit was processed

meanTotalBitPropagationTimePerPacket

mean total bit propagation time per packet

weightedMeanPerGroup(groupRegionsPerPacket(propagationTimePerRegion(demuxFlow(packetFlowMeasured))))

vector,histogram

s

none

the statistical value is the sum of the propagation time of any bit in the region for all channels where that particular bit was propagated

meanTotalBitQueueingTimePerPacket

mean total bit queueing time per packet

weightedMeanPerGroup(groupRegionsPerPacket(queueingTimePerRegion(demuxFlow(packetFlowMeasured))))

vector,histogram

s

none

the statistical value is the sum of the queueing time of any bit in the region for all queues where that particular bit was enqueued

meanTotalBitTransmissionTimePerPacket

mean total bit transmission time per packet

weightedMeanPerGroup(groupRegionsPerPacket(transmissionTimePerRegion(demuxFlow(packetFlowMeasured))))

vector,histogram

s

none

the statistical value is the sum of the transmission duration of any bit in the region for all transmitters where that particular bit was transmitted

meanTotalPacketTransmissionTime

mean total packet transmission time

weightedMeanPerGroup(groupRegionsPerPacket(packetTransmissionTimePerRegion(demuxFlow(packetFlowMeasured))))

vector,histogram

s

none

the statistical value is the sum of the transmission duration of the complete packets for all transmitters where the particular bit of the region was transmitted

outgoingDataRate

outgoing data rate

throughput(merge(packetPushedOut, packetPulledOut))

vector

bps

linear

the statistical value is the data rate of the outgoing packets

outgoingPacketLengths

outgoing packet lengths

packetLength(merge(packetPushedOut, packetPulledOut))

sum,histogram,vector

b

none

the statistical value is the length of the outgoing packet

outgoingPackets

outgoing packets

merge(packetPushedOut, packetPulledOut)

count

pk

the statistical value is the outgoing packet

packetDelayDifferenceToMean

packet delay difference to mean

differenceToMean(weightedMeanPerGroup(groupRegionsPerPacket(elapsedTimePerRegion(demuxFlow(packetFlowMeasured)))))

vector,histogram

s

none

the statistical value is the difference of the current and the mean bit elapsed time per packet

packetDelayVariation

packet delay variation

stddev(weightedMeanPerGroup(groupRegionsPerPacket(elapsedTimePerRegion(demuxFlow(packetFlowMeasured)))))

vector,histogram

s

the statistical value is the variation of the mean bit elapsed time per packet

packetJitter

packet jitter

jitter(weightedMeanPerGroup(groupRegionsPerPacket(elapsedTimePerRegion(demuxFlow(packetFlowMeasured)))))

vector,histogram

s

none

the statistical value is the difference of subsequent values of the mean bit elapsed time per packet

packetLifeTime

packet life time

packetLifeTime(demuxFlow(packetFlowMeasured))

vector,histogram

s

none

the statistical value is the time difference of the current simulation time and the creation time of the whole packet data, nan if not all bits have the same value

totalBitDelayingTime

total bit delaying time

weightTimes(lengthWeightedValuePerRegion(delayingTimePerRegion(demuxFlow(packetFlowMeasured))))

histogram?

s

none

the statistical value is the sum of the delaying time of the bit for all delayers where the bit was delayed

totalBitDelayingTimePerRegion

total bit delaying time per region

dropWeight(lengthWeightedValuePerRegion(delayingTimePerRegion(demuxFlow(packetFlowMeasured))))

vector?,histogram?

s

none

the statistical value (the same for all bits in the region) is the sum of the delaying time of any bit in the region for all delayers where that particular bit was delayed

totalBitProcessingTime

total bit processing time

weightTimes(lengthWeightedValuePerRegion(processingTimePerRegion(demuxFlow(packetFlowMeasured))))

histogram?

s

none

the statistical value is the sum of the processing time of the bit for all processors where the bit was processed

totalBitProcessingTimePerRegion

total bit processing time per region

dropWeight(lengthWeightedValuePerRegion(processingTimePerRegion(demuxFlow(packetFlowMeasured))))

vector?,histogram?

s

none

the statistical value (the same for all bits in the region) is the sum of the processing time of any bit in the region for all processors where that particular bit was processed

totalBitPropagationTime

total bit propagation time

weightTimes(lengthWeightedValuePerRegion(propagationTimePerRegion(demuxFlow(packetFlowMeasured))))

histogram?

s

none

the statistical value is the sum of the propagation time of the bit for all channels where the bit was propagated

totalBitPropagationTimePerRegion

total bit propagation time per region

dropWeight(lengthWeightedValuePerRegion(propagationTimePerRegion(demuxFlow(packetFlowMeasured))))

vector?,histogram?

s

none

the statistical value (the same for all bits in the region) is the sum of the propagation time of any bit in the region for all channels where that particular bit was propagated

totalBitQueueingTime

total bit queueing time

weightTimes(lengthWeightedValuePerRegion(queueingTimePerRegion(demuxFlow(packetFlowMeasured))))

histogram?

s

none

the statistical value is the sum of the queueing time of the bit for all queues where the bit was enqueued

totalBitQueueingTimePerRegion

total bit queueing time per region

dropWeight(lengthWeightedValuePerRegion(queueingTimePerRegion(demuxFlow(packetFlowMeasured))))

vector?,histogram?

s

none

the statistical value (the same for all bits in the region) is the sum of the queueing time of any bit in the region for all queues where that particular bit was enqueued

totalBitTransmissionTime

total bit transmission time

weightTimes(lengthWeightedValuePerRegion(transmissionTimePerRegion(demuxFlow(packetFlowMeasured))))

histogram?

s

none

the statistical value is the sum of the transmission duration of the bit for all transmitters where the bit was transmitted

totalBitTransmissionTimePerRegion

total bit transmission time per region

dropWeight(lengthWeightedValuePerRegion(transmissionTimePerRegion(demuxFlow(packetFlowMeasured))))

vector?,histogram?

s

none

the statistical value (the same for all bits in the region) is the sum of the transmission duration of any bit in the region for all transmitters where that particular bit was transmitted

totalPacketTransmissionTimePerBit

total packet transmission time per bit

weightTimes(lengthWeightedValuePerRegion(packetTransmssionTimePerRegion(demuxFlow(packetFlowMeasured))))

histogram?

s

none

the statistical value is the sum of the transmission duration of the complete packets for all transmitters where the bit was transmitted

totalPacketTransmissionTimePerRegion

total packet transmission time per region

dropWeight(lengthWeightedValuePerRegion(packetTransmissionTimePerRegion(demuxFlow(packetFlowMeasured))))

vector?,histogram?

s

none

the statistical value (the same for all bits in the region) is the sum of the transmission duration of the complete packets for all transmitters where the particular bit of the region was transmitted

Source code

//
// Part of the flow measurement infrastructure. It can be used
// to record the collected statistics and also to terminate the flow measurements.
//
// The flow measurement statistics are collected for every bit individually.
// The measurement starts from the moment the bit enters the flow and continues
// up to the point where the bit exits the flow. The collected statistics can
// be recorded multiple times during this time. The flow measurement tracks
// bits individually using their unique identity.
//
// @see ~FlowMeasurementStarter
//
simple FlowMeasurementRecorder extends PacketFlowBase like IPacketFlow
{
    parameters:
        object packetFilter = default("*"); // Which packets are considered, matches all packets by default
        int offset @unit(b) = default(0b); // Designates the packet part to be measured
        int length @unit(b) = default(-1b); // Designates the packet part to be measured
        string flowName = default(""); // Use packet flow to separate measurement from other measurements
        string measure = default("not packetEvent"); // Match expression for a combination of: packetEvent, elapsedTime, delayingTime, queueingTime, processingTime, transmissionTime, propagationTime
        bool endMeasurement = default(true);
        string packetEventFileName = default("${resultdir}/${configname}-" + fullPath() + "-packetEvent.json");
        @class(FlowMeasurementRecorder);
        @display("i=block/timer");
        @signal[packetFlowMeasured](type=inet::Packet);
        @signal[packetFlowEnded](type=inet::Packet);
        // the statistic value is the throughput of the measured flow
        @statistic[flowDataRate](title="flow data rate"; source=throughput(packetLength(demuxFlow(packetFlowMeasured))); record=vector; unit=bps; interpolationmode=linear);
        // the statistical value is the time difference of the current simulation time and the creation time of the bit
        @statistic[bitLifeTime](title="bit life time"; source=weightTimes(lengthWeightedValuePerRegion(lifeTimePerRegion(demuxFlow(packetFlowMeasured)))); record=histogram?; unit=s; interpolationmode=none);
        // the statistical value is the elapsed time from the moment the bit entered the flow
        @statistic[bitElapsedTime](title="bit elapsed time"; source=weightTimes(lengthWeightedValuePerRegion(elapsedTimePerRegion(demuxFlow(packetFlowMeasured)))); record=histogram?; unit=s; interpolationmode=none);
        // the statistical value is the sum of the delaying time of the bit for all delayers where the bit was delayed
        @statistic[totalBitDelayingTime](title="total bit delaying time"; source=weightTimes(lengthWeightedValuePerRegion(delayingTimePerRegion(demuxFlow(packetFlowMeasured)))); record=histogram?; unit=s; interpolationmode=none);
        // the statistical value is the sum of the processing time of the bit for all processors where the bit was processed
        @statistic[totalBitProcessingTime](title="total bit processing time"; source=weightTimes(lengthWeightedValuePerRegion(processingTimePerRegion(demuxFlow(packetFlowMeasured)))); record=histogram?; unit=s; interpolationmode=none);
        // the statistical value is the sum of the queueing time of the bit for all queues where the bit was enqueued
        @statistic[totalBitQueueingTime](title="total bit queueing time"; source=weightTimes(lengthWeightedValuePerRegion(queueingTimePerRegion(demuxFlow(packetFlowMeasured)))); record=histogram?; unit=s; interpolationmode=none);
        // the statistical value is the sum of the propagation time of the bit for all channels where the bit was propagated
        @statistic[totalBitPropagationTime](title="total bit propagation time"; source=weightTimes(lengthWeightedValuePerRegion(propagationTimePerRegion(demuxFlow(packetFlowMeasured)))); record=histogram?; unit=s; interpolationmode=none);
        // the statistical value is the sum of the transmission duration of the bit for all transmitters where the bit was transmitted
        @statistic[totalBitTransmissionTime](title="total bit transmission time"; source=weightTimes(lengthWeightedValuePerRegion(transmissionTimePerRegion(demuxFlow(packetFlowMeasured)))); record=histogram?; unit=s; interpolationmode=none);
        // the statistical value is the sum of the transmission duration of the complete packets for all transmitters where the bit was transmitted
        @statistic[totalPacketTransmissionTimePerBit](title="total packet transmission time per bit"; source=weightTimes(lengthWeightedValuePerRegion(packetTransmssionTimePerRegion(demuxFlow(packetFlowMeasured)))); record=histogram?; unit=s; interpolationmode=none);
        // the statistical value (the same for all bits in the region) is the time difference of the current simulation time and the creation time of any bit in the region
        @statistic[bitLifeTimePerRegion](title="bit life time per region"; source=dropWeight(lengthWeightedValuePerRegion(lifeTimePerRegion(demuxFlow(packetFlowMeasured)))); record=vector?,histogram?; unit=s; interpolationmode=none);
        // the statistical value (the same for all bits in the region) is the elapsed time from the moment any bit in the region entered the flow
        @statistic[bitElapsedTimePerRegion](title="bit elapsed time per region"; source=dropWeight(lengthWeightedValuePerRegion(elapsedTimePerRegion(demuxFlow(packetFlowMeasured)))); record=vector?,histogram?; unit=s; interpolationmode=none);
        // the statistical value (the same for all bits in the region) is the sum of the delaying time of any bit in the region for all delayers where that particular bit was delayed
        @statistic[totalBitDelayingTimePerRegion](title="total bit delaying time per region"; source=dropWeight(lengthWeightedValuePerRegion(delayingTimePerRegion(demuxFlow(packetFlowMeasured)))); record=vector?,histogram?; unit=s; interpolationmode=none);
        // the statistical value (the same for all bits in the region) is the sum of the processing time of any bit in the region for all processors where that particular bit was processed
        @statistic[totalBitProcessingTimePerRegion](title="total bit processing time per region"; source=dropWeight(lengthWeightedValuePerRegion(processingTimePerRegion(demuxFlow(packetFlowMeasured)))); record=vector?,histogram?; unit=s; interpolationmode=none);
        // the statistical value (the same for all bits in the region) is the sum of the queueing time of any bit in the region for all queues where that particular bit was enqueued
        @statistic[totalBitQueueingTimePerRegion](title="total bit queueing time per region"; source=dropWeight(lengthWeightedValuePerRegion(queueingTimePerRegion(demuxFlow(packetFlowMeasured)))); record=vector?,histogram?; unit=s; interpolationmode=none);
        // the statistical value (the same for all bits in the region) is the sum of the propagation time of any bit in the region for all channels where that particular bit was propagated
        @statistic[totalBitPropagationTimePerRegion](title="total bit propagation time per region"; source=dropWeight(lengthWeightedValuePerRegion(propagationTimePerRegion(demuxFlow(packetFlowMeasured)))); record=vector?,histogram?; unit=s; interpolationmode=none);
        // the statistical value (the same for all bits in the region) is the sum of the transmission duration of any bit in the region for all transmitters where that particular bit was transmitted
        @statistic[totalBitTransmissionTimePerRegion](title="total bit transmission time per region"; source=dropWeight(lengthWeightedValuePerRegion(transmissionTimePerRegion(demuxFlow(packetFlowMeasured)))); record=vector?,histogram?; unit=s; interpolationmode=none);
        // the statistical value (the same for all bits in the region) is the sum of the transmission duration of the complete packets for all transmitters where the particular bit of the region was transmitted
        @statistic[totalPacketTransmissionTimePerRegion](title="total packet transmission time per region"; source=dropWeight(lengthWeightedValuePerRegion(packetTransmissionTimePerRegion(demuxFlow(packetFlowMeasured)))); record=vector?,histogram?; unit=s; interpolationmode=none);
        // the statistical value is the time difference of the current simulation time and the creation time of any bit in the region
        @statistic[meanBitLifeTimePerPacket](title="mean bit life time per packet"; source=weightedMeanPerGroup(groupRegionsPerPacket(lifeTimePerRegion(demuxFlow(packetFlowMeasured)))); record=vector,histogram; unit=s; interpolationmode=none);
        // the statistical value is the elapsed time from the moment any bit in the region entered the flow
        @statistic[meanBitElapsedTimePerPacket](title="mean bit elapsed time per packet"; source=weightedMeanPerGroup(groupRegionsPerPacket(elapsedTimePerRegion(demuxFlow(packetFlowMeasured)))); record=vector,histogram; unit=s; interpolationmode=none);
        // the statistical value is the sum of the delaying time of any bit in the region for all delayers where that particular bit was delayed
        @statistic[meanTotalBitDelayingTimePerPacket](title="mean total bit delaying time per packet"; source=weightedMeanPerGroup(groupRegionsPerPacket(delayingTimePerRegion(demuxFlow(packetFlowMeasured)))); record=vector,histogram; unit=s; interpolationmode=none);
        // the statistical value is the sum of the processing time of any bit in the region for all processors where that particular bit was processed
        @statistic[meanTotalBitProcessingTimePerPacket](title="mean total bit processing time per packet"; source=weightedMeanPerGroup(groupRegionsPerPacket(processingTimePerRegion(demuxFlow(packetFlowMeasured)))); record=vector,histogram; unit=s; interpolationmode=none);
        // the statistical value is the sum of the queueing time of any bit in the region for all queues where that particular bit was enqueued
        @statistic[meanTotalBitQueueingTimePerPacket](title="mean total bit queueing time per packet"; source=weightedMeanPerGroup(groupRegionsPerPacket(queueingTimePerRegion(demuxFlow(packetFlowMeasured)))); record=vector,histogram; unit=s; interpolationmode=none);
        // the statistical value is the sum of the propagation time of any bit in the region for all channels where that particular bit was propagated
        @statistic[meanTotalBitPropagationTimePerPacket](title="mean total bit propagation time per packet"; source=weightedMeanPerGroup(groupRegionsPerPacket(propagationTimePerRegion(demuxFlow(packetFlowMeasured)))); record=vector,histogram; unit=s; interpolationmode=none);
        // the statistical value is the sum of the transmission duration of any bit in the region for all transmitters where that particular bit was transmitted
        @statistic[meanTotalBitTransmissionTimePerPacket](title="mean total bit transmission time per packet"; source=weightedMeanPerGroup(groupRegionsPerPacket(transmissionTimePerRegion(demuxFlow(packetFlowMeasured)))); record=vector,histogram; unit=s; interpolationmode=none);
        // the statistical value is the sum of the transmission duration of the complete packets for all transmitters where the particular bit of the region was transmitted
        @statistic[meanTotalPacketTransmissionTime](title="mean total packet transmission time"; source=weightedMeanPerGroup(groupRegionsPerPacket(packetTransmissionTimePerRegion(demuxFlow(packetFlowMeasured)))); record=vector,histogram; unit=s; interpolationmode=none);
        // the statistical value is the time difference of the current simulation time and the creation time of the whole packet data, nan if not all bits have the same value
        @statistic[packetLifeTime](title="packet life time"; source=packetLifeTime(demuxFlow(packetFlowMeasured)); record=vector,histogram; unit=s; interpolationmode=none);
        // the statistical value is the difference of subsequent values of the mean bit elapsed time per packet
        @statistic[packetJitter](title="packet jitter"; source=jitter(weightedMeanPerGroup(groupRegionsPerPacket(elapsedTimePerRegion(demuxFlow(packetFlowMeasured))))); record=vector,histogram; unit=s; interpolationmode=none);
        // the statistical value is the difference of the current and the mean bit elapsed time per packet
        @statistic[packetDelayDifferenceToMean](title="packet delay difference to mean"; source=differenceToMean(weightedMeanPerGroup(groupRegionsPerPacket(elapsedTimePerRegion(demuxFlow(packetFlowMeasured))))); record=vector,histogram; unit=s; interpolationmode=none);
        // the statistical value is the variation of the mean bit elapsed time per packet
        @statistic[packetDelayVariation](title="packet delay variation"; source=stddev(weightedMeanPerGroup(groupRegionsPerPacket(elapsedTimePerRegion(demuxFlow(packetFlowMeasured))))); record=vector,histogram; unit=s);
}

File: src/inet/queueing/flow/FlowMeasurementRecorder.ned