Revision: 8892
          http://playerstage.svn.sourceforge.net/playerstage/?rev=8892&view=rev
Author:   hsujohnhsu
Date:     2010-09-10 22:42:00 +0000 (Fri, 10 Sep 2010)

Log Message:
-----------
minor, added some more timing stuff

Modified Paths:
--------------
    code/gazebo/branches/wg/server/Simulator.cc
    code/gazebo/branches/wg/server/rendering/UserCamera.cc

Modified: code/gazebo/branches/wg/server/Simulator.cc
===================================================================
--- code/gazebo/branches/wg/server/Simulator.cc 2010-09-10 19:36:35 UTC (rev 
8891)
+++ code/gazebo/branches/wg/server/Simulator.cc 2010-09-10 22:42:00 UTC (rev 
8892)
@@ -409,7 +409,7 @@
   Time currTime = 0;
   Time lastTime = 0;
   struct timespec timeSpec;
-  double freq = 80.0;
+  double freq = 80.0; //FIXME: HARDCODED
 
   this->physicsThread = new boost::thread( 
                          boost::bind(&Simulator::PhysicsLoop, this));
@@ -426,18 +426,18 @@
 
       if (this->gui)
       {
-        DIAGNOSTICTIMER(timer("GUI update",6));
+        DIAGNOSTICTIMER(timer1("GUI update",6));
         this->gui->Update();
       }
 
       if (this->renderEngineEnabled)
       {
         {
-          DIAGNOSTICTIMER(timer("Camera update",6));
+          DIAGNOSTICTIMER(timer1("GUI Camera update",6));
           OgreAdaptor::Instance()->UpdateCameras();
         }
         {
-          DIAGNOSTICTIMER(timer("Graphics update",6));
+          DIAGNOSTICTIMER(timer1("GUI Graphics update",6));
           World::Instance()->GraphicsUpdate();
         }
       }
@@ -445,11 +445,11 @@
       currTime = this->GetWallTime();
 
       {
-        DIAGNOSTICTIMER(timer("Process Entities to Load",6));
+        DIAGNOSTICTIMER(timer1("GUI Process Entities to Load",6));
         World::Instance()->ProcessEntitiesToLoad();
       }
       {
-        DIAGNOSTICTIMER(timer("Process Entities to Delete",6));
+        DIAGNOSTICTIMER(timer1("GUI Process Entities to Delete",6));
         World::Instance()->ProcessEntitiesToDelete();
       }
 
@@ -686,7 +686,6 @@
   {
     DIAGNOSTICTIMER(timer("PHYSICS LOOP ",6));
 
-    //DIAGNOSTICTIMER(timer("PhysicsLoop Timer ",6));
     currTime = this->GetRealTime();
 
     // performance wise, this is not ideal, move this outside of while loop 
and use signals and slots.
@@ -703,12 +702,10 @@
     lastTime = this->GetRealTime();
 
     {
-      {
-        DIAGNOSTICTIMER(timer("PhysicsLoop MR MD Mutex and world->Update() 
",6));
-        boost::recursive_mutex::scoped_lock lock(*this->GetMRMutex());
-        boost::recursive_mutex::scoped_lock 
model_delete_lock(*this->GetMDMutex());
-        world->Update();
-      }
+      DIAGNOSTICTIMER(timer1("PHYSICS MR MD Mutex and world->Update() ",6));
+      boost::recursive_mutex::scoped_lock lock(*this->GetMRMutex());
+      boost::recursive_mutex::scoped_lock 
model_delete_lock(*this->GetMDMutex());
+      world->Update();
     }
 
     currTime = this->GetRealTime();
@@ -744,7 +741,7 @@
     nanosleep(&req, &rem);
 
     {
-      DIAGNOSTICTIMER(timer("PhysicsLoop UpdateSimIfaces ",6));
+      DIAGNOSTICTIMER(timer1("PHYSICS UpdateSimIfaces ",6));
 
       // Process all incoming messages from simiface
       world->UpdateSimulationIface();

Modified: code/gazebo/branches/wg/server/rendering/UserCamera.cc
===================================================================
--- code/gazebo/branches/wg/server/rendering/UserCamera.cc      2010-09-10 
19:36:35 UTC (rev 8891)
+++ code/gazebo/branches/wg/server/rendering/UserCamera.cc      2010-09-10 
22:42:00 UTC (rev 8892)
@@ -186,10 +186,14 @@
   this->lastUpdate = Simulator::Instance()->GetRealTime();
 
   {
+    DIAGNOSTICTIMER(timer("UserCamera: UpdateCam with MDMutex",6));
     boost::recursive_mutex::scoped_lock 
md_lock(*Simulator::Instance()->GetMDMutex());
     OgreCamera::UpdateCam();
   }
-  this->window->update();
+  {
+    DIAGNOSTICTIMER(timer("UserCamera: window->update",6));
+    this->window->update();
+  }
 
   if (this->saveFramesP->GetValue())
   {


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to