[ndnSIM] fw: Add signals to monitor Hits/Misses of the CS
diff --git a/daemon/fw/forwarder.cpp b/daemon/fw/forwarder.cpp
index f3a3c71..c9f2d1d 100644
--- a/daemon/fw/forwarder.cpp
+++ b/daemon/fw/forwarder.cpp
@@ -171,6 +171,7 @@
{
NFD_LOG_DEBUG("onContentStoreMiss interest=" << interest.getName());
++m_counters.nCsMisses;
+ afterCsMiss(interest);
// insert in-record
// FIXME Strategies are not prepared to handle non-zero EndpointIds, so always insert
@@ -212,6 +213,7 @@
{
NFD_LOG_DEBUG("onContentStoreHit interest=" << interest.getName());
++m_counters.nCsHits;
+ afterCsHit(interest, data);
data.setTag(make_shared<lp::IncomingFaceIdTag>(face::FACEID_CONTENT_STORE));
// FIXME Should we lookup PIT for other Interests that also match the data?
diff --git a/daemon/fw/forwarder.hpp b/daemon/fw/forwarder.hpp
index d433288..3b48660 100644
--- a/daemon/fw/forwarder.hpp
+++ b/daemon/fw/forwarder.hpp
@@ -192,6 +192,14 @@
*/
signal::Signal<Forwarder, pit::Entry> beforeExpirePendingInterest;
+ /** \brief Signals when the incoming interest pipeline gets a hit from the content store
+ */
+ signal::Signal<Forwarder, Interest, Data> afterCsHit;
+
+ /** \brief Signals when the incoming interest pipeline gets a miss from the content store
+ */
+ signal::Signal<Forwarder, Interest> afterCsMiss;
+
PUBLIC_WITH_TESTS_ELSE_PRIVATE: // pipelines
/** \brief incoming Interest pipeline
*/