mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/DBLayer: Add QueueSize() method (#26733)
* Core/DBLayer: Add QueueSize() method
Add QueueSize() method to database objects (Login, Character and World) that returns how many tasks are queued.
Include the queue size of the 3 databases in ".server debug" command
* Make the code less threadsafe
* Send data to InfluxDB
* Update grafana dashboard
(cherry picked from commit 96dc110f4a)
This commit is contained in:
@@ -281,6 +281,9 @@ extern int main(int argc, char** argv)
|
||||
sMetric->Initialize(realm.Name, *ioContext, []()
|
||||
{
|
||||
TC_METRIC_VALUE("online_players", sWorld->GetPlayerCount());
|
||||
TC_METRIC_VALUE("db_queue_login", LoginDatabase.QueueSize());
|
||||
TC_METRIC_VALUE("db_queue_character", CharacterDatabase.QueueSize());
|
||||
TC_METRIC_VALUE("db_queue_world", WorldDatabase.QueueSize());
|
||||
});
|
||||
|
||||
TC_METRIC_EVENT("events", "Worldserver started", "");
|
||||
|
||||
Reference in New Issue
Block a user