utils/bench-packets.cc
changeset 1869 9e5d8b4893b2
parent 1866 e7dbcc4df546
parent 1814 21c9c4dd9768
child 2643 2a3324f4dabe
--- a/utils/bench-packets.cc	Mon Oct 29 13:40:25 2007 -0700
+++ b/utils/bench-packets.cc	Thu Nov 08 17:05:37 2007 -0800
@@ -211,13 +211,19 @@
       argc--;
       argv++;
   }
+  if (n == 0)
+    {
+      std::cerr << "Error-- number of packets must be specified " <<
+        "by command-line argument --n=(number of packets)" << std::endl;
+      exit (1);
+    }
+  std::cout << "Running bench-packets with n=" << n << std::endl;
 
-
+  Packet::EnableMetadata ();
   runBench (&benchPtrA, n, "a");
   runBench (&benchPtrB, n, "b");
   runBench (&benchPtrC, n, "c");
 
-  Packet::EnableMetadata ();
   //runBench (&benchPrint, n, "print");
   PacketMetadata::SetOptOne (false);
   runBench (&benchPtrA, n, "meta-a");