tracers: New metrics in L3RateTracer
L3RateTracer now has 4 new per-face metrics:
- InSatisfiedInterests: a number of satisfied interests where face was
part of the incoming set
- InTimedOutInterests: a number of timed out interests where face was
part of the incoming set
- OutSatisfiedInterests: a number of satisfied interests where face was
part of the outgoing set
- OutTimedOutInterests: a number of timed out interests where face was
part of the outgoing set
Basically, for each face, sum of InSatisfied and InTimedOut (or sum of
OutSatisfied and OutTimedOut) equals to the number of totally received
(or forwarded) interests on the face.
Refs #1007 (http://redmine.named-data.net)
diff --git a/utils/tracers/ndn-l3-rate-tracer.cc b/utils/tracers/ndn-l3-rate-tracer.cc
index 91f057a..c0b9fff 100644
--- a/utils/tracers/ndn-l3-rate-tracer.cc
+++ b/utils/tracers/ndn-l3-rate-tracer.cc
@@ -295,6 +295,12 @@
PRINTER ("InData", m_inData);
PRINTER ("OutData", m_outData);
PRINTER ("DropData", m_dropData);
+
+ PRINTER ("InSatisfiedInterests", m_satisfiedInterests);
+ PRINTER ("InTimedOutInterests", m_timedOutInterests);
+
+ PRINTER ("OutSatisfiedInterests", m_outSatisfiedInterests);
+ PRINTER ("OutTimedOutInterests", m_outTimedOutInterests);
}
{
@@ -375,17 +381,45 @@
}
void
-L3RateTracer::SatisfiedInterests (Ptr<const pit::Entry>)
+L3RateTracer::SatisfiedInterests (Ptr<const pit::Entry> entry)
{
m_stats[0].get<0> ().m_satisfiedInterests ++;
// no "size" stats
+
+ for (pit::Entry::in_container::const_iterator i = entry->GetIncoming ().begin ();
+ i != entry->GetIncoming ().end ();
+ i++)
+ {
+ m_stats[i->m_face].get<0> ().m_satisfiedInterests ++;
+ }
+
+ for (pit::Entry::out_container::const_iterator i = entry->GetOutgoing ().begin ();
+ i != entry->GetOutgoing ().end ();
+ i++)
+ {
+ m_stats[i->m_face].get<0> ().m_outSatisfiedInterests ++;
+ }
}
void
-L3RateTracer::TimedOutInterests (Ptr<const pit::Entry>)
+L3RateTracer::TimedOutInterests (Ptr<const pit::Entry> entry)
{
m_stats[0].get<0> ().m_timedOutInterests ++;
// no "size" stats
+
+ for (pit::Entry::in_container::const_iterator i = entry->GetIncoming ().begin ();
+ i != entry->GetIncoming ().end ();
+ i++)
+ {
+ m_stats[i->m_face].get<0> ().m_timedOutInterests ++;
+ }
+
+ for (pit::Entry::out_container::const_iterator i = entry->GetOutgoing ().begin ();
+ i != entry->GetOutgoing ().end ();
+ i++)
+ {
+ m_stats[i->m_face].get<0> ().m_outTimedOutInterests ++;
+ }
}
diff --git a/utils/tracers/ndn-l3-tracer.h b/utils/tracers/ndn-l3-tracer.h
index bca0022..c264d49 100644
--- a/utils/tracers/ndn-l3-tracer.h
+++ b/utils/tracers/ndn-l3-tracer.h
@@ -136,6 +136,9 @@
m_dropData = 0;
m_satisfiedInterests = 0;
m_timedOutInterests = 0;
+
+ m_outSatisfiedInterests = 0;
+ m_outTimedOutInterests = 0;
}
double m_inInterests;
@@ -149,6 +152,8 @@
double m_dropData;
double m_satisfiedInterests;
double m_timedOutInterests;
+ double m_outSatisfiedInterests;
+ double m_outTimedOutInterests;
};
};