utils/bench-packets.cc
changeset 1814 21c9c4dd9768
parent 1323 08174b13d76f
child 1869 9e5d8b4893b2
--- a/utils/bench-packets.cc	Fri Nov 02 08:41:50 2007 -0700
+++ b/utils/bench-packets.cc	Tue Nov 06 15:45:05 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");