mirror of
https://github.com/glest/glest-source.git
synced 2025-08-30 03:09:49 +02:00
- added perf timings to main program loop
This commit is contained in:
@@ -290,18 +290,28 @@ void Program::loopWorker() {
|
|||||||
int updateCount = 0;
|
int updateCount = 0;
|
||||||
while(prevState == this->programState && updateTimer.isTime()) {
|
while(prevState == this->programState && updateTimer.isTime()) {
|
||||||
//SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
//SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
Chrono chronoUpdateLoop;
|
||||||
|
chronoUpdateLoop.start();
|
||||||
|
|
||||||
GraphicComponent::update();
|
GraphicComponent::update();
|
||||||
programState->update();
|
programState->update();
|
||||||
|
if(chronoUpdateLoop.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] programState->update took msecs: %lld, updateCount = %d\n",__FILE__,__FUNCTION__,__LINE__,chronoUpdateLoop.getMillis(),updateCount);
|
||||||
|
if(chronoUpdateLoop.getMillis() > 0) chrono.start();
|
||||||
|
|
||||||
if(prevState == this->programState) {
|
if(prevState == this->programState) {
|
||||||
//SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
//SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
|
||||||
if(soundThreadManager == NULL) {
|
if(soundThreadManager == NULL) {
|
||||||
SoundRenderer::getInstance().update();
|
SoundRenderer::getInstance().update();
|
||||||
|
if(chronoUpdateLoop.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] SoundRenderer::getInstance().update() took msecs: %lld, updateCount = %d\n",__FILE__,__FUNCTION__,__LINE__,chronoUpdateLoop.getMillis(),updateCount);
|
||||||
|
if(chronoUpdateLoop.getMillis() > 0) chrono.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
//SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
//SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
|
||||||
NetworkManager::getInstance().update();
|
NetworkManager::getInstance().update();
|
||||||
|
if(chronoUpdateLoop.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] NetworkManager::getInstance().update() took msecs: %lld, updateCount = %d\n",__FILE__,__FUNCTION__,__LINE__,chronoUpdateLoop.getMillis(),updateCount);
|
||||||
|
if(chronoUpdateLoop.getMillis() > 0) chrono.start();
|
||||||
|
|
||||||
//SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
//SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
}
|
}
|
||||||
@@ -310,7 +320,7 @@ void Program::loopWorker() {
|
|||||||
//if(chrono.getMillis() >= 100) {
|
//if(chrono.getMillis() >= 100) {
|
||||||
// skipRenderFrameCount = (chrono.getMillis() / 100);
|
// skipRenderFrameCount = (chrono.getMillis() / 100);
|
||||||
//}
|
//}
|
||||||
if(chrono.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s] Line: %d programState->render took msecs: %lld ==============> MAIN LOOP BODY LOGIC, updateCount = %d\n",__FILE__,__FUNCTION__,__LINE__,chrono.getMillis(),updateCount);
|
if(chrono.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s] Line: %d AFTER programState->update took msecs: %lld ==============> MAIN LOOP BODY LOGIC, updateCount = %d\n",__FILE__,__FUNCTION__,__LINE__,chrono.getMillis(),updateCount);
|
||||||
if(chrono.getMillis() > 0) chrono.start();
|
if(chrono.getMillis() > 0) chrono.start();
|
||||||
|
|
||||||
//SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
//SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
Reference in New Issue
Block a user