From: <geo...@us...> - 2013-08-16 05:53:12
|
Revision: 6341 http://sourceforge.net/p/freeorion/code/6341 Author: geoffthemedio Date: 2013-08-16 05:53:06 +0000 (Fri, 16 Aug 2013) Log Message: ----------- Small patch by yandonman adding timing to server turn processing functions. Modified Paths: -------------- trunk/FreeOrion/server/ServerApp.cpp Modified: trunk/FreeOrion/server/ServerApp.cpp =================================================================== --- trunk/FreeOrion/server/ServerApp.cpp 2013-08-15 20:45:27 UTC (rev 6340) +++ trunk/FreeOrion/server/ServerApp.cpp 2013-08-16 05:53:06 UTC (rev 6341) @@ -22,6 +22,7 @@ #include "../util/Order.h" #include "../util/OrderSet.h" #include "../util/SitRepEntry.h" +#include "../util/ScopedTimer.h" #include <GG/SignalsAndSlots.h> @@ -32,6 +33,7 @@ #include <boost/functional/hash.hpp> #include <boost/thread/thread.hpp> + #include <ctime> namespace fs = boost::filesystem; @@ -2126,6 +2128,8 @@ } void ServerApp::PreCombatProcessTurns() { + + ScopedTimer timer("ServerApp::PreCombatProcessTurns", true); ObjectMap& objects = m_universe.Objects(); @@ -2253,6 +2257,7 @@ } void ServerApp::ProcessCombats() { + ScopedTimer timer("ServerApp::ProcessCombats", true); Logger().debugStream() << "ServerApp::ProcessCombats"; m_networking.SendMessage(TurnProgressMessage(Message::COMBAT)); @@ -2374,6 +2379,9 @@ } void ServerApp::PostCombatProcessTurns() { + + ScopedTimer timer("ServerApp::PostCombatProcessTurns", true); + EmpireManager& empires = Empires(); ObjectMap& objects = m_universe.Objects(); |