[ndnSIM] How to obtain content diversity of network?
alexander.afanasyev at ucla.edu
Fri Aug 30 09:50:52 PDT 2013
Getting the number of cached Data packets can be done something like this (I'm copying a part of examples/ndn-simple-with-cs-lfu.cc):
uint64_t csCount = 0;
for (NodeList::Iterator node = NodeList::Begin ();
node != NodeList::End ();
Ptr<ndn::ContentStore> cs = (*node)->GetObject<ndn::ContentStore> ();
csCount += cs->GetSize ();
The total number of content in the network is something that is known just to you in your simulation scenario, so you can manually pre-calculate the value based on simulation setup. (In general, number of content in the network is virtually unlimited.)
On Aug 27, 2013, at 8:34 PM, 陈胜蓝 <blindeafer at 163.com> wrote:
> Hi All,
> I would like to obtain an average content diversity of network, I think it would be number of content cached in network divided by total number of content,how could I obtain the value from simulation,would you please give me some hints?
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ndnSIM