<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">Hi </span><span style="color: rgb(0, 0, 0); font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt; background-color: rgba(0, 0, 0, 0); display: inline !important;">André, </span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
The most obvious problem I can think of (as Junxiao explained) is that the data might have been served from the local nfd's cache. Please enable the nfd-logs, look at the consumer's log, and see if local nfd is sending back the cached dat<span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">a. </span><br>
<span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;"><br>
To set debug nfd log from the experiment: "</span><span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">AppManager(self.ndn, self.ndn.net.hosts, Nfd,
</span><b style="font-size: 12pt; font-style: inherit; font-variant-ligatures: inherit; font-variant-caps: inherit;">logLevel='DEBUG</b><span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">')" </span><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;"><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Regarding the resource, you can refer to the Mini-NDN website: <a href="http://minindn.memphis.edu/" id="LPlnk342643">http://minindn.memphis.edu/</a>, <span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">and
 also, you can look at some of the examples here: <a href="https://github.com/named-data/mini-ndn/tree/master/examples" id="LPlnk638399">https://github.com/named-data/mini-ndn/tree/master/examples</a>.</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;"><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">If you have any specific questions regarding the setup, please let me know. </span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;"><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">Regards,</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">Saurab Dulal</span></div>
<div id="Signature">
<div>
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
</div>
</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> André D. Carneiro <adcarneiro@inf.ufrgs.br><br>
<b>Sent:</b> Wednesday, September 9, 2020 3:02 PM<br>
<b>To:</b> Saurab Dulal (sdulal) <sdulal@memphis.edu><br>
<b>Subject:</b> RE: [Mini-NDN] Problems measuring elapsed time in MiniNDN experiment</font>
<div> </div>
</div>
<style>
<!--
@font-face
        {font-family:"Cambria Math"}
@font-face
        {font-family:Calibri}
p.x_MsoNormal, li.x_MsoNormal, div.x_MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif}
a:link, span.x_MsoHyperlink
        {color:blue;
        text-decoration:underline}
.x_MsoChpDefault
        {}
@page WordSection1
        {margin:72.0pt 72.0pt 72.0pt 72.0pt}
div.x_WordSection1
        {}
-->
</style>
<div lang="EN-GB" link="blue" vlink="#954F72">
<div class="x_WordSection1">
<p class="x_MsoNormal">Hi Saurab,</p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal">I`m computing m_sTimeDiff in the run function, but it was previously in the onData function and yielded very similar results. Do you think it could be some issue with the setup? Maybe a misconfiguration for NFD or NLSR?
</p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal">And an additional question, could you point me to some documentation regarding the setup process for MiniNDN? Most of what I did was running the scripts that download and installed all the packages. Maybe there is something more that
 I missed.</p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal">Thanks for the reponse,</p>
<p class="x_MsoNormal">André D. Carneiro</p>
<p class="x_MsoNormal"> </p>
<div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0cm 0cm 0cm">
<p class="x_MsoNormal" style="border:none; padding:0cm"><b>From: </b><a href="mailto:sdulal@memphis.edu">Saurab Dulal (sdulal)</a><br>
<b>Sent: </b>09 September 2020 16:20<br>
<b>To: </b><a href="mailto:mini-ndn@lists.cs.ucla.edu">Anurag Muttur via Mini-NDN</a><br>
<b>Subject: </b>Re: [Mini-NDN] Problems measuring elapsed time in MiniNDN experiment</p>
</div>
<p class="x_MsoNormal"> </p>
<div>
<p class="x_MsoNormal"><span style="font-size:12.0pt; color:black">Hi Anurag, </span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="font-size:12.0pt; color:black"> </span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="font-size:12.0pt; color:black">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.</span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="font-size:12.0pt; color:black"> </span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="font-size:12.0pt; color:black">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). </span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="font-size:12.0pt; color:black"> </span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="font-size:12.0pt; color:black">Regards,</span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="font-size:12.0pt; color:black">Saurab Dulal</span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="font-size:12.0pt; color:black"> </span></p>
</div>
<p class="x_MsoNormal"><img border="0" width="694" height="2" id="x_Horizontal_x0020_Line_x0020_1" style="width:7.2291in; height:.0208in" data-outlook-trace="F:1|T:1" src="cid:image001.png@01D686CB.10B9BF60"></p>
<div id="x_divRplyFwdMsg">
<p class="x_MsoNormal"><b><span style="color:black">From:</span></b><span style="color:black"> Mini-NDN <mini-ndn-bounces@lists.cs.ucla.edu> on behalf of Lan Wang (lanwang) <lanwang@memphis.edu><br>
<b>Sent:</b> Tuesday, September 8, 2020 11:37 PM<br>
<b>To:</b> Anurag Muttur via Mini-NDN <mini-ndn@lists.cs.ucla.edu><br>
<b>Subject:</b> [Mini-NDN] Problems measuring elapsed time in MiniNDN experiment</span>
</p>
<div>
<p class="x_MsoNormal"> </p>
</div>
</div>
<div>
<p class="x_MsoNormal"> </p>
<div>
<p class="x_MsoNormal"><br>
<br>
</p>
<blockquote style="margin-top:5.0pt; margin-bottom:5.0pt">
<div>
<p class="x_MsoNormal">Begin forwarded message:</p>
</div>
<div>
<p class="x_MsoNormal"> </p>
</div>
<p class="x_MsoNormal"> </p>
<div>
<p class="x_MsoNormal">The attached message has been automatically discarded.</p>
<div>
<p class="x_MsoNormal"><b>From: </b>Andre Dexheimer Carneiro <<a href="mailto:andre.dexheimer@inf.ufrgs.br">andre.dexheimer@inf.ufrgs.br</a>></p>
</div>
<div>
<p class="x_MsoNormal"><b>Subject: Problems measuring elapsed time in MiniNDN experiment</b></p>
</div>
<div>
<p class="x_MsoNormal"><b>Date: </b>September 8, 2020 at 9:41:38 PM CDT</p>
</div>
<div>
<p class="x_MsoNormal"><b>To: </b><a href="mailto:mini-ndn@lists.cs.ucla.edu">mini-ndn@lists.cs.ucla.edu</a></p>
</div>
<p class="x_MsoNormal" style="margin-bottom:12.0pt"><br>
<br>
Hi,<br>
<br>
<br>
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:<br>
<br>
-----<br>
  dtBegin   = std::chrono::steady_clock::now();<br>
  m_face.expressInterest(interest, bind(&Consumer::onData, this,   _1, _2),<br>
     bind(&Consumer::onNack, this, _1, _2), bind(&Consumer::onTimeout, this, _1));<br>
<br>
  // processEvents will block until the requested data is received or a timeout occurs<br>
  m_face.processEvents();<br>
<br>
  dtEnd       = std::chrono::steady_clock::now();<br>
  m_sTimeDiff = std::chrono::duration_cast<std::chrono::microseconds>(dtEnd - dtBegin).count();\<br>
-----<br>
<br>
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?<br>
<br>
<br>
<br>
Thanks in advance.<br>
<br>
André Dexheimer Carneiro<br>
Computer Enginnering - UFRGS<br>
<br>
</p>
</div>
</blockquote>
</div>
</div>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal"> </p>
</div>
</div>
</body>
</html>