Core/Logs: Add load time to some logs like every other load log

(cherry picked from commit 4289eae5e754c3abba85998045d958cfbef36abd)
This commit is contained in:
Aokromes
2021-01-21 22:30:40 +01:00
committed by funjoker
parent 93552510ab
commit 41a4692de3
2 changed files with 10 additions and 4 deletions
+4 -2
View File
@@ -57,6 +57,8 @@ CalendarMgr* CalendarMgr::instance()
void CalendarMgr::LoadFromDB()
{
uint32 oldMSTime = getMSTime();
uint32 count = 0;
_maxEventId = 0;
_maxInviteId = 0;
@@ -90,7 +92,7 @@ void CalendarMgr::LoadFromDB()
}
while (result->NextRow());
TC_LOG_INFO("server.loading", ">> Loaded %u calendar events", count);
TC_LOG_INFO("server.loading", ">> Loaded %u calendar events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
count = 0;
// 0 1 2 3 4 5 6 7
@@ -117,7 +119,7 @@ void CalendarMgr::LoadFromDB()
}
while (result->NextRow());
TC_LOG_INFO("server.loading", ">> Loaded %u calendar invites", count);
TC_LOG_INFO("server.loading", ">> Loaded %u calendar invites in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
for (uint64 i = 1; i < _maxEventId; ++i)
if (!GetEvent(i))
+6 -2
View File
@@ -43,6 +43,8 @@ WardenCheckMgr::~WardenCheckMgr()
void WardenCheckMgr::LoadWardenChecks()
{
uint32 oldMSTime = getMSTime();
// Check if Warden is enabled by config before loading anything
if (!sWorld->getBoolConfig(CONFIG_WARDEN_ENABLED))
{
@@ -124,11 +126,13 @@ void WardenCheckMgr::LoadWardenChecks()
}
while (result->NextRow());
TC_LOG_INFO("server.loading", ">> Loaded %u warden checks.", count);
TC_LOG_INFO("server.loading", ">> Loaded %u warden checks in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void WardenCheckMgr::LoadWardenOverrides()
{
uint32 oldMSTime = getMSTime();
// Check if Warden is enabled by config before loading anything
if (!sWorld->getBoolConfig(CONFIG_WARDEN_ENABLED))
{
@@ -170,7 +174,7 @@ void WardenCheckMgr::LoadWardenOverrides()
}
while (result->NextRow());
TC_LOG_INFO("server.loading", ">> Loaded %u warden action overrides.", count);
TC_LOG_INFO("server.loading", ">> Loaded %u warden action overrides in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
WardenCheckMgr* WardenCheckMgr::instance()