Changing output of ThruputMeter from (bit/sec) to Mbps

221 views
Skip to first unread message

Mohammad Masoumi

unread,
Aug 5, 2013, 11:26:29 PM8/5/13
to omn...@googlegroups.com
Dear my friends

Hello

ThruputMeter calculates its output based on bit/sec , but I want it would show  based on Mbps .I know I must change its source code , but I do not know where and how can I do that.I think in finish() it should be manipulated . Is there any body help to me ?
 I want to achieve similarity of two graphs , you can see in images that what  want to do.

void ThruputMeter::finish()
{
    simtime_t duration = simTime() - startTime;

    recordScalar("duration", duration);
    recordScalar("total packets", numPackets);
    recordScalar("total bits", numBits);

    recordScalar("avg throughput (bit/s)", numBits/duration.dbl());
    recordScalar("avg packets/s", numPackets/duration.dbl());
Can you tell me how can I change the value of ThruputMeter?

Report.png
Throughput.png

Frank Wetzels

unread,
Aug 6, 2013, 6:00:03 AM8/6/13
to omn...@googlegroups.com
Probably too easy :-)

recordScalar("avg throughput (bit/s)", numBits/duration.dbl()/1000000);


--
--
Sent from the OMNeT++ mailing list. To configure your membership,
visit http://groups.google.com/group/omnetpp
 
---
You received this message because you are subscribed to the Google Groups "omnetpp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
<Report.png><Throughput.png>


Mohammad Masoumi

unread,
Aug 9, 2013, 11:45:16 PM8/9/13
to omn...@googlegroups.com
Dear f.wetzels

Thanks a lot because of your reply.Your answer was useful and complete.
But I have another issue :

As you can see in the images , my graph is similar to the other graph, but if I want to delete record before 96 seconds , how can I do that ?
In other words, my graph starts from 0 second, while other graph starts from 96 seconds.
Ultimate3.png is my work and 1.png
Ultimates3.png
1.png

raman

unread,
Sep 9, 2013, 1:52:35 AM9/9/13
to omn...@googlegroups.com
hi 

can u please explain the use of throughputmet in detail.

Thanks and Regards
Ramanpreet Kaur

Mohammad Masoumi

unread,
Sep 9, 2013, 12:18:29 PM9/9/13
to omn...@googlegroups.com

 Which kink of information do you want ?
 I have embedded ThruputMeter inside of sink to calculate of throughput.


On Tuesday, August 6, 2013 11:26:29 AM UTC+8, Mohammad Masoumi wrote:

Ramanpreet Kaur

unread,
Sep 10, 2013, 2:22:43 AM9/10/13
to omn...@googlegroups.com
Thanx for ur reply sir.
sir , i have generated a topology using ReaSE and now i want to calculate the throughput of WebServer. i just wnt to know how can i attach a throughput meter with that server.


Thanks and Regards
Ramanpreet Kaur

--
--
Sent from the OMNeT++ mailing list. To configure your membership,
visit http://groups.google.com/group/omnetpp
 
---
You received this message because you are subscribed to a topic in the Google Groups "omnetpp" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/omnetpp/sbPbPU19MSY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to omnetpp+u...@googlegroups.com.

Mohammad Masoumi

unread,
Sep 10, 2013, 10:40:44 AM9/10/13
to omn...@googlegroups.com
This situation is depends on your traffic:
    your traffic can be  UDP or TCP traffic
.
   You have to use standardHost because it has UDP and TCP module separately
  You should put ThruputMeter between UDP/TCP and network layer (Two ways) .
 

On Tuesday, August 6, 2013 11:26:29 AM UTC+8, Mohammad Masoumi wrote:

Shaikha Al-Khuder

unread,
Feb 4, 2016, 12:58:40 AM2/4/16
to OMNeT++ Users

Yes! I want to do this. How did you add the thruputmeter to your network module?
This is what I did but it did not work.

Am I suppose to add it to AODVRouter in the connections section like this :
I defined Thruput: ThruputMeter
in AODVRouter and then I did this in my network ned file:
host.Thruput.out --> networkLayer.transportIn++;
host.Thruput.in --> networkLayer.transportOut++;

(host is my AODV router parameter name)

What do you think?
Reply all
Reply to author
Forward
0 new messages