[ndnSIM] hit ratio of Content Store
Narges Mehran
narges.mehran at gmail.com
Sun Feb 8 01:07:53 PST 2015
Hello and thank you,
Sorry for the delay in replying...
It works! Thanks a million...
But I have another question: why can't i see the PIT and CS Size
simultaneously, It means I can see CS Size in normal way but when I want to
see the PIT size, I have to change the prefix of producer! e.g.,
Names::Add ("consumer1", nodes.Get (0));
Names::Add ("router" , nodes.Get (1));
Names::Add ("producer1" , nodes.Get (2));
Ptr<Node> consumer1 = Names::Find<Node> ("consumer1");
Ptr<Node> producer1 = Names::Find<Node> ("producer1");
// Install CCNx stack on all nodes
ndn::StackHelper ndnHelper;
ndnHelper.SetDefaultRoutes (true);
ndnHelper.SetPit ("ns3::ndn::pit::Persistent::AggregateStats");
ndnHelper.SetForwardingStrategy ("ns3::ndn::fw::Flooding");
ndnHelper.SetContentStore ("ns3::ndn::cs::Lru::AggregateStats",
"MaxSize", "5"); //Size = 5!
ndnHelper.InstallAll ();
// Consumer1
ndn::AppHelper consumerHelper ("ns3::ndn::ConsumerCbr");
// Consumer will request /Yahoo/0, /Yahoo/1, ...
*consumerHelper.SetPrefix ("/Yahoo");*
consumerHelper.SetAttribute ("Frequency", StringValue ("10")); // 10
interests a second
consumerHelper.SetAttribute ("MaxSeq",StringValue("20"));
consumerHelper.Install (consumer1); // first node
// Producer1
ndn::AppHelper producerHelper ("ns3::ndn::Producer");
// Producer will reply to all requests starting with /Yahoo
*producerHelper.SetPrefix ("/Yahoo123");* //////////////////////////////
why???\\\\\\\\\\\\\\
producerHelper.SetAttribute ("PayloadSize", StringValue("1024"));
producerHelper.Install (producer1);
.
.
.
/////////////////output in abnormal way\\\\\\\\\\\\\\\\\\\\\\\\
All the PIT Entries are: /Yahoo
PIT Size CS Size
30 0
\\\\\\\\\\\\\\\\\\/////////////////////////////////////////
/////////////////output in normal way\\\\\\\\\\\\\\\\\\\\\\\\ ----->
*producerHelper.SetPrefix
("/Yahoo");*
All the CS Entries are: /Yahoo
PIT Size CS Size
0 20
\\\\\\\\\\\\\\\\\////////////////////////////////////////
When the max size of CS is "5", why the output is "20"?
I don' know where my problem is?! :-/
On Thu, Feb 5, 2015 at 5:41 AM, Spyridon (Spyros) Mastorakis <
spiros.mastorakis at gmail.com> wrote:
> Hello,
>
> in order to find out how to use the csTracer you can just follow this link
> and take a look at the related simulation example:
>
> http://ndnsim.net/2.0/metric.html#example-of-content-store-trace-helper
>
> --
> Spyridon (Spyros) Mastorakis
> Personal Website: http://cs.ucla.edu/~mastorakis/
> Internet Research Laboratory
> PhD Computer Science
> UCLA
>
>
>
>
> > On Feb 4, 2015, at 12:08 AM, Narges Mehran <narges.mehran at gmail.com>
> wrote:
> >
> > Hi Alex,
> >
> > I'm trying to get each router's hit ratio (CS) by CsTracer.
> > I can't access the status of CS, though I had added "#include
> "ns3/ndnSIM/utils/tracers/ndn-cs-tracer.h"!!!
> > ---------------------------My Code---------------------
> > ndn::CsTracer::Print (&std::ostream);
> > ---------------------------Error-------------------------
> > error: expected primary-expression before ‘)’ token
> > ndn::CsTracer::Print (std::ostream);
> >
> > Tnx in advance...
> >
> >
> > _______________________________________________
> > ndnSIM mailing list
> > ndnSIM at lists.cs.ucla.edu
> > http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20150208/017d3cbf/attachment.html>
More information about the ndnSIM
mailing list