From deceb11b5fc52c8036f249d628ccc69ca5d022b3 Mon Sep 17 00:00:00 2001 From: Giacomo Pozzoni Date: Thu, 30 Jul 2020 19:42:27 +0000 Subject: 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 --- src/server/worldserver/Main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/server/worldserver/Main.cpp') diff --git a/src/server/worldserver/Main.cpp b/src/server/worldserver/Main.cpp index 95f0326f028..45564e3cdf9 100644 --- a/src/server/worldserver/Main.cpp +++ b/src/server/worldserver/Main.cpp @@ -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*/) -- cgit v1.2.3