Search code examples
unetstack

Throughput calculation of a simulation in UnetStack using trace.json file


I'm developing a trace analyzer tool for UnetStack. My tool can determine TxCount, RxCount, and end-to-end delay for each successfully received packet by using a simulation's trace.json file. Next, I want to calculate the throughput. How do I do that? Is there enough data in the trace.json file to calculate throughput?


Solution

  • There are many different definitions for throughput, depending on which layer traffic you're looking at. The tracer included with UnetStack computes throughput at the PHY layer, by measuring the total amount of time that a node is busy receiving successful frames normalized by the total amount of simulation time x number of nodes.

    You could do the same by looking at the RxFrameNtf entries in trace.json, but will need additional information such as CONTROL and DATA frame duration from your simulation settings in order to complete the computation, as this information is not published in the trace.json in the current version (3.x) of UnetStack.

    The relevant information is currently more easily available from trace.nam.

    P.S. We may expose the duration information in a later version of UnetStack.