Measuring End-to-end Delay¶
Goals¶
In this example we explore the end-to-end delay statistics of applications.
4.4
The Model¶
The end-to-end delay is measured from the moment the packet leaves the source application to the moment the same packet arrives at the destination application.
The end-to-end delay is measured by the meanBitLifeTimePerPacket
statistic.
The statistic measures the lifetime of the packet, i.e. time from creation in the source application
to deletion in the destination application.
Note
The meanBit part refers to the statistic being defined per bit, and the result is the mean of the per-bit values of all bits in the packet. When there is no packet streaming or fragmentation in the network, the bits of a packet travel together, so they have the same lifetime value.
Here is the network:

Here is the configuration:
[General]
network = EndToEndDelayMeasurementShowcase
description = "Measure packet end-to-end delay"
sim-time-limit = 1s
# source application ~96Mbps throughput
*.source.numApps = 1
*.source.app[0].typename = "UdpSourceApp"
*.source.app[0].source.packetLength = 1200B
*.source.app[0].source.productionInterval = exponential(100us)
*.source.app[0].io.destAddress = "destination"
*.source.app[0].io.destPort = 1000
# destination application
*.destination.numApps = 1
*.destination.app[0].typename = "UdpSinkApp"
*.destination.app[0].io.localPort = 1000