utils/bench-packets.cc
changeset 833 224bfad58818
parent 832 3d1243d770d9
child 874 85c528e8eb0b
--- a/utils/bench-packets.cc	Sat Jun 02 19:10:35 2007 +0200
+++ b/utils/bench-packets.cc	Sun Jun 03 20:09:56 2007 +0200
@@ -20,6 +20,7 @@
  */
 #include "ns3/system-wall-clock-ms.h"
 #include "ns3/packet.h"
+#include "ns3/packet-history.h"
 #include <iostream>
 #include <sstream>
 
@@ -173,17 +174,27 @@
 {
   uint32_t n = 0;
   while (argc > 0) {
-      if (strncmp ("--n=", argv[0],strlen ("--n=")) == 0) {
+      if (strncmp ("--n=", argv[0],strlen ("--n=")) == 0) 
+        {
           char const *nAscii = argv[0] + strlen ("--n=");
           n = atoi (nAscii);
-      }
+        }
+      if (strncmp ("--enable-history", argv[0], strlen ("--enable-history")) == 0)
+        {
+          PacketHistory::Enable ();          
+        }
       argc--;
       argv++;
   }
 
+
+
   runBench (&benchPtrA, n, "a");
+  PacketHistory::PrintStats ();
   runBench (&benchPtrB, n, "b");
+  PacketHistory::PrintStats ();
   runBench (&benchPtrC, n, "c");
+  PacketHistory::PrintStats ();
 
   return 0;
 }