Performance Monitor Improvements:

1. Added command for runtime toggle
2. Changed where tick time is captured to properly capture per-tick statistics (matching cmangos playerbots)
This commit is contained in:
Christoph Wilk
2024-08-13 17:38:57 +09:00
parent e522db810c
commit 4d5dd0e2fc
6 changed files with 28 additions and 13 deletions

View File

@@ -11,6 +11,11 @@ PlayerbotAIBase::PlayerbotAIBase(bool isBotAI) : nextAICheckDelay(0), _isBotAI(i
void PlayerbotAIBase::UpdateAI(uint32 elapsed, bool minimal)
{
if (totalPmo)
totalPmo->finish();
totalPmo = sPerformanceMonitor->start(PERF_MON_TOTAL, "PlayerbotAIBase::FullTick");
if (nextAICheckDelay > elapsed)
nextAICheckDelay -= elapsed;
else