<div dir="ltr">Hi Hussein,<br><div><br></div><div>Thank you so much for your reply. I'll try the code.</div><div><br></div><div>My best regards,</div><div>Zakaria</div></div><div hspace="streak-pt-mark" style="max-height:1px"><img alt="" style="width:0px;max-height:0px;overflow:hidden" src="https://mailfoogae.appspot.com/t?sender=aemFrYXJpYS5zYWJpckB1aXQuYWMubWE%3D&type=zerocontent&guid=b9a626dc-b3bd-4912-990d-8b25895c7271"><font color="#ffffff" size="1">ᐧ</font></div><img src="https://my-email-signature.link/signature.gif?u=128007&e=185324406&v=be6fdb713f3203d3b77cfdb9d7d233510dd7e7e0989f3b6065b2baea29569d27" alt="" width="0" height="0" style="width:2px;max-height:0;overflow:hidden"><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 14, 2021 at 8:00 PM <<a href="mailto:ndnsim-request@lists.cs.ucla.edu">ndnsim-request@lists.cs.ucla.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Send ndnSIM mailing list submissions to<br>
        <a href="mailto:ndnsim@lists.cs.ucla.edu" target="_blank">ndnsim@lists.cs.ucla.edu</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" rel="noreferrer" target="_blank">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:ndnsim-request@lists.cs.ucla.edu" target="_blank">ndnsim-request@lists.cs.ucla.edu</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:ndnsim-owner@lists.cs.ucla.edu" target="_blank">ndnsim-owner@lists.cs.ucla.edu</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of ndnSIM digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. Re: Current size of CS & PIT (Hussein AlOmaisi)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Thu, 14 Oct 2021 01:10:31 +0000 (UTC)<br>
From: Hussein AlOmaisi <<a href="mailto:alomaisi2004@yahoo.com" target="_blank">alomaisi2004@yahoo.com</a>><br>
To: "<a href="mailto:ndnsim@lists.cs.ucla.edu" target="_blank">ndnsim@lists.cs.ucla.edu</a>" <<a href="mailto:ndnsim@lists.cs.ucla.edu" target="_blank">ndnsim@lists.cs.ucla.edu</a>><br>
Subject: Re: [ndnSIM] Current size of CS & PIT<br>
Message-ID: <<a href="mailto:1604247277.1394161.1634173831992@mail.yahoo.com" target="_blank">1604247277.1394161.1634173831992@mail.yahoo.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi Zakrai,<br>
1.a) How to calculate the total of entries in the CS at each second of the<br>
simulation time?2) Similarly, is there any way to obtain the number of entries in the PIT<br>
by time?<br>
To get PIT and CS size (number of entries), her a simple code:<br>
void printPitCSSize(){<br>
? auto currentNode = ns3::NodeList::GetNode(ns3::Simulator::GetContext());<br>
? auto& CurrNodePit = currentNode->GetObject<ndn::L3Protocol>()->getForwarder()->getPit();<br>
? auto& CurrNodeCS = currentNode->GetObject<ndn::L3Protocol>()->getForwarder()->getCs();<br>
? std::cout << "PIT number of entries: " << CurrNodePit.size() << " | CS number of stored packets: " <<? CurrNodeCS.size();<br>
}<br>
to get that information at every specific time, you can schedule calling printPitCSSize() function using ns3::Simulator::Schedule().<br>
<br>
1.b) If I use the CS tracer and count the number of cache hits at every second, does this give the number of entries at that time?<br>
No. Cache hits do not express the total number stord packets in the cache. Cache hit only indicates the case that a request has been successfully satisified from the node's local cache. Assume that there are 10 stored packets in the cache, at specific time, 2 requests have been received and satisifed from the local cache, in this case the cache size is 10 while the cache hits is 2.? <br>
<br>
I hope it helps.<br>
Best regards,Hussein <br>
<br>
<br>
    On Thursday, October 14, 2021, 03:00:05 AM GMT+8, <<a href="mailto:ndnsim-request@lists.cs.ucla.edu" target="_blank">ndnsim-request@lists.cs.ucla.edu</a>> wrote:  <br>
<br>
 Send ndnSIM mailing list submissions to<br>
??? <a href="mailto:ndnsim@lists.cs.ucla.edu" target="_blank">ndnsim@lists.cs.ucla.edu</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
??? <a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" rel="noreferrer" target="_blank">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a><br>
or, via email, send a message with subject or body 'help' to<br>
??? <a href="mailto:ndnsim-request@lists.cs.ucla.edu" target="_blank">ndnsim-request@lists.cs.ucla.edu</a><br>
<br>
You can reach the person managing the list at<br>
??? <a href="mailto:ndnsim-owner@lists.cs.ucla.edu" target="_blank">ndnsim-owner@lists.cs.ucla.edu</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of ndnSIM digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
? 1. Current size of CS & PIT (Zakaria SABIR)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Wed, 13 Oct 2021 16:21:32 +0100<br>
From: Zakaria SABIR <<a href="mailto:zakaria.sabir@uit.ac.ma" target="_blank">zakaria.sabir@uit.ac.ma</a>><br>
To: ndnsim <<a href="mailto:ndnsim@lists.cs.ucla.edu" target="_blank">ndnsim@lists.cs.ucla.edu</a>><br>
Subject: [ndnSIM] Current size of CS & PIT<br>
Message-ID:<br>
??? <<a href="mailto:CAPQYZ1-5PZpqx10XBtkvzbR8TWkEBnbFn9fYP4Ex9990mBEXQA@mail.gmail.com" target="_blank">CAPQYZ1-5PZpqx10XBtkvzbR8TWkEBnbFn9fYP4Ex9990mBEXQA@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Dear members,<br>
<br>
I have 2 questions about the size of the CS and the PIT:<br>
<br>
1) How to calculate the total of entries in the CS at each second of the<br>
simulation time? If I use the CS tracer and count the number of cache hits<br>
at every second, does this give the number of entries at that time?<br>
<br>
2) Similarly, is there any way to obtain the number of entries in the PIT<br>
by time?<br>
<br>
Regards,<br>
Zakaria<br>
?<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20211013/ed993460/attachment-0001.html" rel="noreferrer" target="_blank">http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20211013/ed993460/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
ndnSIM mailing list<br>
<a href="mailto:ndnSIM@lists.cs.ucla.edu" target="_blank">ndnSIM@lists.cs.ucla.edu</a><br>
<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" rel="noreferrer" target="_blank">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a><br>
<br>
<br>
------------------------------<br>
<br>
End of ndnSIM Digest, Vol 107, Issue 23<br>
***************************************<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20211014/1bce7918/attachment-0001.html" rel="noreferrer" target="_blank">http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20211014/1bce7918/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
ndnSIM mailing list<br>
<a href="mailto:ndnSIM@lists.cs.ucla.edu" target="_blank">ndnSIM@lists.cs.ucla.edu</a><br>
<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" rel="noreferrer" target="_blank">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a><br>
<br>
<br>
------------------------------<br>
<br>
End of ndnSIM Digest, Vol 107, Issue 24<br>
***************************************<br>
</blockquote></div>