20 #ifndef CCNX_CS_TRACER_H 21 #define CCNX_CS_TRACER_H 23 #include "ns3/ndnSIM/model/ndn-common.hpp" 26 #include "ns3/simple-ref-count.h" 27 #include <ns3/nstime.h> 28 #include <ns3/event-id.h> 29 #include <ns3/node-container.h> 62 class CsTracer :
public SimpleRefCount<CsTracer> {
77 InstallAll(
const std::string&
file, Time averagingPeriod = Seconds(0.5));
93 Install(
const NodeContainer& nodes,
const std::string& file, Time averagingPeriod = Seconds(0.5));
109 Install(Ptr<Node> node,
const std::string& file, Time averagingPeriod = Seconds(0.5));
124 Install(Ptr<Node> node, shared_ptr<std::ostream> outputStream,
125 Time averagingPeriod = Seconds(0.5));
141 CsTracer(shared_ptr<std::ostream> os, Ptr<Node> node);
148 CsTracer(shared_ptr<std::ostream> os,
const std::string& node);
161 PrintHeader(std::ostream& os)
const;
169 Print(std::ostream& os)
const;
176 CacheHits(shared_ptr<const Interest>, shared_ptr<const Data>);
179 CacheMisses(shared_ptr<const Interest>);
183 SetAveragingPeriod(
const Time& period);
195 shared_ptr<std::ostream> m_os;
218 #endif // CCNX_CS_TRACER_H NDN tracer for cache performance (hits and misses)
Copyright (c) 2011-2015 Regents of the University of California.
std::ostream & operator<<(std::ostream &os, const ContentStore &cs)
ndn CsTracer
Copyright (c) 2011-2015 Regents of the University of California.
void Print(std::ostream &os) const
Print current trace data.
Opaque type (shared_ptr) representing ID of a scheduled event.
void PrintHeader(std::ostream &os) const
Print head of the trace (e.g., for post-processing)
Copyright (c) 2011-2015 Regents of the University of California.