[ndnSIM] Get Cached Content Size

Spyridon (Spyros) Mastorakis mastorakis at CS.UCLA.EDU
Wed Jun 1 18:41:10 PDT 2016


Hi,

if you use the CS of NFD, you can use the size() method of the CS class to get the number of packets stored in CS:

https://github.com/named-data-ndnSIM/NFD/blob/NFD-0.3.4-ndnSIM/daemon/table/cs.hpp#L125

If you use the CS of ndnSIM, you can use the GetSize() method to retrieve the number of packets stored in CS:

https://github.com/named-data-ndnSIM/ndnSIM/blob/master/model/cs/ndn-content-store.hpp#L151-L152

Use example:

https://github.com/named-data-ndnSIM/ndnSIM/blob/a4915caa0c4121f2dd87fd3d7cc3b6eb91632f16/tests/other/ndn-test.cpp#L113-L116

Hope that this helps!

Spyridon (Spyros) Mastorakis
Personal Website: http://cs.ucla.edu/~mastorakis/ <http://cs.ucla.edu/~mastorakis/>
Internet Research Laboratory
Computer Science Department
UCLA

> On May 30, 2016, at 4:42 AM, Dhiab Imen <dhiabimen at gmail.com> wrote:
> 
> Hi all,
> 
> I want to know if it is possible to get total size of cached content in the content Store? and how??
>  
> thanks for help.
> 
> -- 
> Cordialement 
> Imen Dhiab
> 
> ***************************************************************************************************
> Ingénieur Informatique diplômé de l'Ecole Nationale d'Ingénieurs de Sfax.
> Membre de l'unité de recherche SAGE (Systèmes Avancés en Génie Electrique), Ecole Nationale d'Ingénieurs de Sousse.
> +216 53 59 19 88
> Pages personnelles : http://www.sage-eniso.org/profile-membre/fr/T/85/dhiab-imene.html <http://www.sage-eniso.org/profile-membre/fr/T/85/dhiab-imene.html>
> ***************************************************************************************************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20160601/d24f61b2/attachment.html>


More information about the ndnSIM mailing list