Index: /orxonox/trunk/src/orxonox.cc
===================================================================
--- /orxonox/trunk/src/orxonox.cc	(revision 3647)
+++ /orxonox/trunk/src/orxonox.cc	(revision 3648)
@@ -268,4 +268,16 @@
 }
 
+
+#include "list.h"
+#include "world_entity.h"
+#include "vector.h"
+#include <asm/msr.h>
+#include <linux/timex.h>
+
+
+#define LIST_MAX 10000
+#define VECTOR_MAX 1000000
+#define ITERATIONS 10000
+
 /**
    \brief main function
@@ -275,4 +287,40 @@
 int main(int argc, char** argv) 
 {  
+  
+  /* reading arguments 
+     
+     currently supported arguments are:
+     <no args>                   ::    just starts orxonox
+     --benchmark                 ::    start the benchmark without starting orxonox
+     
+     this is a preselection: it matches to one of the start* functions, the
+     finetuning is made in those functions.
+  */
+
+
+  int i;
+  for(i = 0; i < argc; ++i)
+    {
+      if(! strcmp( "--help", argv[i])) return startHelp();
+      else if(! strcmp( "--benchmark", argv[i])) return startBenchmarks();
+    }
+
+  PRINTF(2)("Orxonox does not understand the arguments");
+  return startOrxonox(argc, argv);
+}
+
+
+
+int startHelp()
+{
+  printf("orxonox: starts the orxonox game - rules\n");
+  printf("usage: orxonox [arg]\n\n");
+  printf("valid options:\n");
+  printf(" --benchmark\tstarts the orxonox benchmark\n");
+  printf(" --help \tshows this menu\n");
+}
+
+int startOrxonox(int argc, char** argv)
+{
   printf(">>> Starting Orxonox <<<\n");
   Orxonox *orx = Orxonox::getInstance();
@@ -288,4 +336,105 @@
   //delete orx;
   
-  return 0;
-}
+}
+
+
+int startBenchmarks()
+{
+
+  printf("===========================================================\n");
+  printf("=                      BENCHMARKS                         =\n");
+  printf("===========================================================\n");
+
+  // first measure the time overhead:
+  unsigned long ini, end, dt, tmp;
+  rdtscl(ini); rdtscl(end);
+  dt = end - ini;
+
+  int type = 0; 
+  /* type   -1 == all 
+     type    0 == framework
+     type    1 == vector
+     type    2 == quaternion
+  */
+  if(type == 0 || type == -1)
+    {
+      /* framework test*/
+      WorldEntity* w = NULL;
+      int i = 0;
+      unsigned long mittel = 0;
+      
+      for(i = 0; i < ITERATIONS; ++i)
+	{
+	  rdtscl(ini);
+	  
+	  WorldEntity* w = new WorldEntity();
+	  
+	  rdtscl(end);
+	  mittel += (end - ini - dt);
+	}
+      float mi = mittel / (float)ITERATIONS;
+      printf("Generate a WorldEntity objec [cycles]t: \t%f\n", mi);
+      
+      
+      mittel = 0;
+      w = new WorldEntity();
+      for(i = 0; i < ITERATIONS; ++i)
+	{
+	  rdtscl(ini);
+	  
+	  w->tick(0.0f);
+	   
+	  rdtscl(end);
+	  mittel += (end - ini - dt);
+	  }
+      mi = mittel / (float)ITERATIONS;
+      printf("Call an empty function of WE [cycles]t: \t%f\n", mi);
+      
+      tList<WorldEntity>* list = new tList<WorldEntity>();
+      
+      
+      // generating list
+      for(i = 0; i < LIST_MAX; ++i)
+	{
+	  w = new WorldEntity();
+	  list->add(w);
+	}
+	
+      
+	// reuse list
+      w = list->enumerate();
+      while( w != NULL)
+	{
+	  w->tick(0.0f);
+	  w = list->nextElement();
+	}
+
+      }
+  if(type == 1 || type == -1)
+    {
+      /* vector test */
+      Vector* a = new Vector(1.3, 5.3, 4.1);
+      Vector* b = new Vector(0.4, 2.5, 6.2);
+      Vector* c = new Vector();
+      
+      int i = 0;
+      // addition
+      for(i = 0; i < VECTOR_MAX; ++i)
+	{
+	  *c = *a + *b;
+	}
+      
+      // multiplikation
+      for(i = 0; i < VECTOR_MAX; ++i)
+	{
+	  *c = a->cross( *b);
+	}
+      if(type == 1 || type == -1)
+	{
+	  /* quaternion test */
+
+	}
+      
+
+    }
+}
Index: /orxonox/trunk/src/orxonox.h
===================================================================
--- /orxonox/trunk/src/orxonox.h	(revision 3647)
+++ /orxonox/trunk/src/orxonox.h	(revision 3648)
@@ -72,4 +72,8 @@
 };
 
+int startHelp(void);
+int startOrxonox(int argc, char** argv);
+int startBenchmarks(void);
+
 #endif /* _ORXONOX_H */
 
