tools: display satisfied and unsatisfied interests counters
refs: #4720
Change-Id: I69c2400a558997ff48f2b66883cc680dc497360a
diff --git a/tools/nfdc/forwarder-general-module.cpp b/tools/nfdc/forwarder-general-module.cpp
index e0d6b1b..417b346 100644
--- a/tools/nfdc/forwarder-general-module.cpp
+++ b/tools/nfdc/forwarder-general-module.cpp
@@ -88,6 +88,9 @@
<< "</outgoingPackets>";
os << "</packetCounters>";
+ os << "<nSatisfiedInterests>" << item.getNSatisfiedInterests() << "</nSatisfiedInterests>";
+ os << "<nUnsatisfiedInterests>" << item.getNUnsatisfiedInterests() << "</nUnsatisfiedInterests>";
+
os << "</generalStatus>";
}
@@ -102,7 +105,7 @@
void
ForwarderGeneralModule::formatItemText(std::ostream& os, const ForwarderStatus& item)
{
- text::ItemAttributes ia(true, 20);
+ text::ItemAttributes ia(true, 21);
os << ia("version") << item.getNfdVersion()
<< ia("startTime") << text::formatTimestamp(item.getStartTimestamp())
@@ -120,7 +123,9 @@
<< ia("nInData") << item.getNInData()
<< ia("nOutData") << item.getNOutData()
<< ia("nInNacks") << item.getNInNacks()
- << ia("nOutNacks") << item.getNOutNacks();
+ << ia("nOutNacks") << item.getNOutNacks()
+ << ia("nSatisfiedInterests") << item.getNSatisfiedInterests()
+ << ia("nUnsatisfiedInterests") << item.getNUnsatisfiedInterests();
os << ia.end();
}