"Throughput" and "Delay" formula explanation

378 views
Skip to first unread message

Rahul Singh Gulia

unread,
Jun 25, 2021, 9:07:55 AM6/25/21
to ns-3-users
Hello,

I am exploring the FlowMonitor formulas to calculate various metrics like Throughput, Delay, Jitter, etc. I am getting the values, but I really want to understand the math behind them. 

outFile << "  Throughput: " << i->second.rxBytes * 8.0 / rxDuration / 1000 / 1000  << " Mbps\n";
  
outFile << "  Mean delay:  " << 1000 * i->second.delaySum.GetSeconds () / i->second.rxPackets << " ms\n";

I would really appreciate it if anyone can try to give me some idea about these formulas implemented in the flow monitor code. 
I understand that throughput is calculated in bits/sec here, so it is multiplied by 8. But why it is divided by 1000/1000.

And delay is calculated in ms, that's why it is multiplied by 1000. And delay = Sum of all the delays / Total number of received packets.

Please let me know if I am right or wrong on this one. I would really appreciate any kind of suggestion on this one.


Best Regards,
Rahul

Rahul Singh Gulia

unread,
Jun 25, 2021, 9:24:19 AM6/25/21
to ns-3-users
Luckily I found the answer to my own question. If someone else may have the same issue nor or in the future regarding this, kindly refer to the below research paper. It explains everything. 

Carneiro, Gustavo & Fortuna, Pedro & Ricardo, Manuel. (2009). FlowMonitor - a network monitoring framework for the Network Simulator 3 (NS-3). 10.4108/ICST.VALUETOOLS2009.7493. 


Cheers,
Rahul

omar alramli

unread,
Jun 25, 2021, 10:47:08 AM6/25/21
to ns-3-...@googlegroups.com
To calculate the throughput by Mega bit per second. It needs to * 8 to change from bytes to bits and devided by /1000/1000 to get the result by Mbps.

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/3d3b853c-32b1-4547-8ff3-295985d122e6n%40googlegroups.com.

Imperialzinho

unread,
Jun 25, 2021, 5:09:13 PM6/25/21
to ns-3-users
I thought it was /1024/1024 for Mbps, so the broker is /1000/1000? 

GA Ratcliffs

unread,
Jun 26, 2021, 8:09:40 AM6/26/21
to ns-3-...@googlegroups.com
Data rate values do not use the k=1024 (power of 2 based) convention. For data rates k = 1000 and m = 1000000. Two main reasons are that data rates are not limited to binary multiples like memory sizes are, and data rates are typically related by a constant to the signal bandwidth. It would be quite messy if the bandwidth factor for 999 bps was different than that for 1kbps.

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.

Imperialzinho

unread,
Jun 26, 2021, 8:27:49 AM6/26/21
to ns-3-users
Thanks

Hemant Saini

unread,
Jun 26, 2021, 8:29:12 AM6/26/21
to ns-3-...@googlegroups.com

Can anyone share the code which is workable for uav


To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/49c9cc7f-9e89-42c7-8bdf-04b085900a35n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages