diff options
author | Giacomo Pozzoni <giacomopoz@gmail.com> | 2021-07-24 14:50:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-24 14:50:30 +0200 |
commit | 96dc110f4a353871ac74c82ff4b1bcc4c34156f3 (patch) | |
tree | 076c45e0c291256a0d9e2ecbf7c8d989c5431470 /src/server/worldserver/Main.cpp | |
parent | 48f63eda9029d4fe16b7a350059c8e26ba8484ce (diff) |
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
Diffstat (limited to 'src/server/worldserver/Main.cpp')
-rw-r--r-- | src/server/worldserver/Main.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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", ""); |