mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 08:28:32 +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
This commit is contained in:
@@ -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*/)
|
||||
|
||||
Reference in New Issue
Block a user