[Mini-NDN] [EXT]Re: Problems measuring elapsed time in MiniNDN experiment

Saurab Dulal (sdulal) sdulal at memphis.edu
Wed Sep 9 12:40:51 PDT 2020


Yes, that's what I am suspecting too. If there are several interest, then the final diff time will be the aggregated time from beginning till the final schedule. This can incur a false/high number than expected if the computation is for per interest.

Saurab,
________________________________
From: Junxiao Shi <shijunxiao at email.arizona.edu>
Sent: Wednesday, September 9, 2020 2:32 PM
To: Saurab Dulal (sdulal) <sdulal at memphis.edu>
Cc: Anurag Muttur via Mini-NDN <mini-ndn at lists.cs.ucla.edu>
Subject: Re: [EXT]Re: [Mini-NDN] Problems measuring elapsed time in MiniNDN experiment

Hi Saurab

I think OP is recording the end time after face.processEvents() returns.
This is unusual but valid according to API: face.processEvents() should block until there’s nothing scheduled on the asio::io_context. This means, suppose this is the only Interest on the face, face.processEvent() should return when the Interest is either satisfied or expired.

I don’t know what’s causing the problem though.

Yours, Junxiao

On Wed, Sep 9, 2020 at 15:20 Saurab Dulal (sdulal) <sdulal at memphis.edu<mailto:sdulal at memphis.edu>> wrote:











External Email




Hi Anurag,











Where are you computing "m_sTimeDiff"? are you computing it inside the callback? if the data is received, "onData" should be called and I assume you are computing it there? If not, you will not get the right value.











Additionally, you can also use NDN_LOG. For every log message, it begins with a Unix timestamp which you can use to compute the time difference (this is what I do most of the time).











Regards,




Saurab Dulal























________________________________


From: Mini-NDN <mini-ndn-bounces at lists.cs.ucla.edu<mailto:mini-ndn-bounces at lists.cs.ucla.edu>> on behalf of Lan Wang (lanwang) <lanwang at memphis.edu<mailto:lanwang at memphis.edu>>


Sent: Tuesday, September 8, 2020 11:37 PM


To: Anurag Muttur via Mini-NDN <mini-ndn at lists.cs.ucla.edu<mailto:mini-ndn at lists.cs.ucla.edu>>


Subject: [Mini-NDN] Problems measuring elapsed time in MiniNDN experiment














Begin forwarded message:












The attached message has been automatically discarded.




From: Andre Dexheimer Carneiro <andre.dexheimer at inf.ufrgs.br<mailto:andre.dexheimer at inf.ufrgs.br>>






Subject: Problems measuring elapsed time in MiniNDN experiment






Date: September 8, 2020 at 9:41:38 PM CDT






To: mini-ndn at lists.cs.ucla.edu<mailto:mini-ndn at lists.cs.ucla.edu>










Hi,








I am writing an experiment which instantiates NDN producers and consumers as an attempt to simulate a specific scenario with multiple hosts. However, I can't seem to measure the elapsed time correctly, my code right now is:





-----


  dtBegin   = std::chrono::steady_clock::now();


  m_face.expressInterest(interest, bind(&Consumer::onData, this,   _1, _2),


     bind(&Consumer::onNack, this, _1, _2), bind(&Consumer::onTimeout, this, _1));





  // processEvents will block until the requested data is received or a timeout occurs


  m_face.processEvents();





  dtEnd       = std::chrono::steady_clock::now();


  m_sTimeDiff = std::chrono::duration_cast<std::chrono::microseconds>(dtEnd - dtBegin).count();\


-----





Everything seems to work fine, with nodes receiving and sending data as they should, however the recorded times are usually at around 1000 us, which is completely unrealistic as the links have between 2ms and 1000ms delay in my topology. Could anybody cast

some light into how to get this metric correctly?











Thanks in advance.





André Dexheimer Carneiro


Computer Enginnering - UFRGS























_______________________________________________

Mini-NDN mailing list

Mini-NDN at lists.cs.ucla.edu<mailto:Mini-NDN at lists.cs.ucla.edu>

http://www.lists.cs.ucla.edu/mailman/listinfo/mini-ndn

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/mini-ndn/attachments/20200909/72d928c2/attachment-0001.html>


More information about the Mini-NDN mailing list