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

Lan Wang (lanwang) lanwang at memphis.edu
Tue Sep 8 21:37:24 PDT 2020



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



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


More information about the Mini-NDN mailing list