mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-21 10:30:01 +01:00
[Crash Fix] Fixed crashing a few min after server start when AiPlayerbot.PerfMonEnabled=1 (would crash with ACCESS_VIOLATION on first PlayerbotFactory::Randomize() call due to pmo->finish() being called twice on same variable). Also fixed formatting used in PerformanceMonitor::PrintStats() (would print %7.3f etc to screen instead of format the number)
This commit is contained in:
parent
c7bc359752
commit
1e22738248
@ -115,7 +115,7 @@ void PerformanceMonitor::PrintStats(bool perTick, bool fullStack)
|
|||||||
|
|
||||||
if (avg >= 0.5f || pd->maxTime > 10)
|
if (avg >= 0.5f || pd->maxTime > 10)
|
||||||
{
|
{
|
||||||
LOG_INFO("playerbots", "%7.3f%% %10.3fs | %6u .. %6u (%9.4f of %10u) - {} : {}"
|
LOG_INFO("playerbots", "{:7.3f}% {:10.3f}s | {:6d} .. {:6d} ({:10.3f} of {:10d}) - {:6} : {}"
|
||||||
, perc
|
, perc
|
||||||
, secs
|
, secs
|
||||||
, pd->minTime
|
, pd->minTime
|
||||||
@ -134,8 +134,6 @@ void PerformanceMonitor::PrintStats(bool perTick, bool fullStack)
|
|||||||
float totalCount = data[PERF_MON_TOTAL]["RandomPlayerbotMgr::FullTick"]->count;
|
float totalCount = data[PERF_MON_TOTAL]["RandomPlayerbotMgr::FullTick"]->count;
|
||||||
total = data[PERF_MON_TOTAL]["RandomPlayerbotMgr::FullTick"]->totalTime;
|
total = data[PERF_MON_TOTAL]["RandomPlayerbotMgr::FullTick"]->totalTime;
|
||||||
|
|
||||||
LOG_INFO("playerbots", " ");
|
|
||||||
LOG_INFO("playerbots", " ");
|
|
||||||
LOG_INFO("playerbots", "---------------------------------------[PER TICK]------------------------------------------------------");
|
LOG_INFO("playerbots", "---------------------------------------[PER TICK]------------------------------------------------------");
|
||||||
LOG_INFO("playerbots", "percentage time | min .. max ( avg of count) - type : name");
|
LOG_INFO("playerbots", "percentage time | min .. max ( avg of count) - type : name");
|
||||||
|
|
||||||
@ -190,7 +188,7 @@ void PerformanceMonitor::PrintStats(bool perTick, bool fullStack)
|
|||||||
|
|
||||||
if (avg >= 0.5f || pd->maxTime > 10)
|
if (avg >= 0.5f || pd->maxTime > 10)
|
||||||
{
|
{
|
||||||
LOG_INFO("playerbots", "%7.3f%% %9ums | %6u .. %6u (%9.4f of %10.3f) - {} : {}"
|
LOG_INFO("playerbots", "{:7.3f}% {:9d}ms | {:6d} .. {:6d} ({:10.3f} of {:10.3f}) - {:6} : {}"
|
||||||
, perc
|
, perc
|
||||||
, secs
|
, secs
|
||||||
, pd->minTime
|
, pd->minTime
|
||||||
|
|||||||
@ -357,8 +357,8 @@ void PlayerbotFactory::Randomize(bool incremental)
|
|||||||
// bot->SaveToDB(false, false);
|
// bot->SaveToDB(false, false);
|
||||||
// InitGuild();
|
// InitGuild();
|
||||||
// bot->SaveToDB(false, false);
|
// bot->SaveToDB(false, false);
|
||||||
if (pmo)
|
//if (pmo)
|
||||||
pmo->finish();
|
// pmo->finish();
|
||||||
|
|
||||||
// if (bot->getLevel() >= 70)
|
// if (bot->getLevel() >= 70)
|
||||||
// {
|
// {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user