mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
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
(cherry picked from commit deceb11b5f)
This commit is contained in:
@@ -481,6 +481,11 @@ void WorldUpdateLoop()
|
||||
uint32 realCurrTime = 0;
|
||||
uint32 realPrevTime = getMSTime();
|
||||
|
||||
LoginDatabase.WarnAboutSyncQueries(true);
|
||||
CharacterDatabase.WarnAboutSyncQueries(true);
|
||||
WorldDatabase.WarnAboutSyncQueries(true);
|
||||
HotfixDatabase.WarnAboutSyncQueries(true);
|
||||
|
||||
///- While we have not World::m_stopEvent, update the world
|
||||
while (!World::IsStopped())
|
||||
{
|
||||
@@ -506,6 +511,11 @@ void WorldUpdateLoop()
|
||||
Sleep(1000);
|
||||
#endif
|
||||
}
|
||||
|
||||
LoginDatabase.WarnAboutSyncQueries(false);
|
||||
CharacterDatabase.WarnAboutSyncQueries(false);
|
||||
WorldDatabase.WarnAboutSyncQueries(false);
|
||||
HotfixDatabase.WarnAboutSyncQueries(false);
|
||||
}
|
||||
|
||||
void SignalHandler(boost::system::error_code const& error, int /*signalNumber*/)
|
||||
|
||||
Reference in New Issue
Block a user