mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-27 04:12:40 +01:00
Log number of Creatures and GameObject per map (#24809)
* Shared/Metric: Allow to specify tags in metrics * Core/Metric: Log number of Creatures and GameObject per map * Apply feedback * Codestyle changes * Codestyle changes * Remove whitespace * Update Grafana dashboards to v7.0.3 * Fix missing filter on realm * Include Creatures and Gameobjects in Maps dashboard * Show instances with a different color
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#include "Log.h"
|
||||
#include "MapInstanced.h"
|
||||
#include "MapManager.h"
|
||||
#include "Metric.h"
|
||||
#include "MiscPackets.h"
|
||||
#include "MMapFactory.h"
|
||||
#include "MotionMaster.h"
|
||||
@@ -879,6 +880,14 @@ void Map::Update(uint32 t_diff)
|
||||
ProcessRelocationNotifies(t_diff);
|
||||
|
||||
sScriptMgr->OnMapUpdate(this, t_diff);
|
||||
|
||||
TC_METRIC_VALUE("map_creatures", uint64(GetObjectsStore().Size<Creature>()),
|
||||
TC_METRIC_TAG("map_id", std::to_string(GetId())),
|
||||
TC_METRIC_TAG("map_instanceid", std::to_string(GetInstanceId())));
|
||||
|
||||
TC_METRIC_VALUE("map_gameobjects", uint64(GetObjectsStore().Size<GameObject>()),
|
||||
TC_METRIC_TAG("map_id", std::to_string(GetId())),
|
||||
TC_METRIC_TAG("map_instanceid", std::to_string(GetInstanceId())));
|
||||
}
|
||||
|
||||
struct ResetNotifier
|
||||
|
||||
Reference in New Issue
Block a user