Log sync db queries in World::Update() loop (#25174)

* Core/Misc: Log sync queries on critical path

* Fix build

* Rename

* Fix warning

* Fix no-pch

* Change WarnAboutSyncQueries() to be header-only
This commit is contained in:
Giacomo Pozzoni
2020-07-30 19:42:27 +00:00
committed by GitHub
parent 0fc7b50c04
commit deceb11b5f
4 changed files with 36 additions and 0 deletions

View File

@@ -426,6 +426,10 @@ void WorldUpdateLoop()
uint32 realCurrTime = 0;
uint32 realPrevTime = getMSTime();
LoginDatabase.WarnAboutSyncQueries(true);
CharacterDatabase.WarnAboutSyncQueries(true);
WorldDatabase.WarnAboutSyncQueries(true);
///- While we have not World::m_stopEvent, update the world
while (!World::IsStopped())
{
@@ -451,6 +455,10 @@ void WorldUpdateLoop()
Sleep(1000);
#endif
}
LoginDatabase.WarnAboutSyncQueries(false);
CharacterDatabase.WarnAboutSyncQueries(false);
WorldDatabase.WarnAboutSyncQueries(false);
}
void SignalHandler(boost::system::error_code const& error, int /*signalNumber*/)