<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>Hi Junxiao,<br></div><div><br data-mce-bogus="1"></div><div>After 1 day trying to understand the forwarder in ndnSIM, but i couldnt get it.</div><div><br>I'm sorry I'm confuse about implement the Forwarder codes to count the hit ratio,<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Where should I implement it ?<br>Should i call it like the old cs-tracer ?<br data-mce-bogus="1"></div><div>Or put it into cs.cpp ?<br><br>Could you please give some example ?<br>Thank you so much,<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Best Regards,<br data-mce-bogus="1"></div><div>Adi Paramartha<br data-mce-bogus="1"></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><b>From: </b>"Junxiao Shi" <shijunxiao@email.arizona.edu><br><b>To: </b>mdparamartha95@students.itb.ac.id<br><b>Cc: </b>"ndnsim" <ndnsim@lists.cs.ucla.edu><br><b>Sent: </b>Tuesday, April 2, 2019 8:00:43 AM<br><b>Subject: </b>Re: [ndnSIM] Calculate Hit Rate from Spesific Nodes in NFD Content Store<br></div><div><br></div><div data-marker="__QUOTED_TEXT__"><div><div dir="auto">Hi Adi</div></div><div dir="auto"><br></div><div dir="auto">NFD already has CS hit/miss counters:</div><div dir="auto"><br></div><div dir="auto">1. Get a hold of Forwarder instance.</div><div dir="auto">2. Read the counter with forwarder.getCounters().nCsHits and forwarder.getCounters().nCsMisses.</div><div dir="auto"><br></div><div dir="auto">There’s no need to modify any callbacks.</div><div dir="auto"><br></div><div dir="auto">Yours, Junxiao</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 1, 2019 at 09:26 <<a href="mailto:mdparamartha95@students.itb.ac.id" target="_blank">mdparamartha95@students.itb.ac.id</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:arial,helvetica,sans-serif;font-size:12pt;color:#000000"><br><div>I had a problem to calculate the hit rate from the spesific node in NFD Content Store,<br></div><br><div>For example, I had installed cs-policy-lru in 5 nodes.</div><br><div>However, I just want to trace the performance of <em><strong>nodes 1</strong></em> instead of <em>nodes 2,3,4 or 5</em>.</div><br><div>As long as my experience, in cs.cpp using a callback function and add some increment if <em>hitcallback</em>  or <em>misscallback</em> is called.</div><br><div>But results show that the increment works with all nodes, and give me entire nodes hit/miss rate. Not hit/miss rate for specific nodes.</div><br><div>How can I calculate the hit/miss rate from specific nodes?</div></div></div>
</blockquote></div></div><br></div></div></body></html>