From 96dc110f4a353871ac74c82ff4b1bcc4c34156f3 Mon Sep 17 00:00:00 2001 From: Giacomo Pozzoni Date: Sat, 24 Jul 2021 14:50:30 +0200 Subject: 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 --- src/server/worldserver/Main.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/server/worldserver/Main.cpp') diff --git a/src/server/worldserver/Main.cpp b/src/server/worldserver/Main.cpp index 241c9ee462b..f72628f9be0 100644 --- a/src/server/worldserver/Main.cpp +++ b/src/server/worldserver/Main.cpp @@ -231,6 +231,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", ""); -- cgit v1.2.3