aboutsummaryrefslogtreecommitdiff
path: root/src/common/Metric
AgeCommit message (Collapse)Author
2025-06-10Core/Misc: Kill copy/move constructors for singleton classesShauren
2025-06-08Core/Misc: Remove boost/algorithm dependencyShauren
2025-05-19Core/Misc: Fixed some uninitialized variablesShauren
2024-12-09Dep: Replace basic_deadline_timer with std::chrono based basic_waitable_timerShauren
2023-12-08Core/Misc: Minor code modernization - kill std::bindShauren
2023-08-25Core/Logging: Fixed log message order not being preserved when async logging ↵Shauren
was enabled and ThreadPool was greater than 1 Despite that issue, logging was still threadsafe, just not ordered properly
2023-01-08Core/Logging: Switch from fmt::sprintf to fmt::format (c++20 standard ↵Shauren
compatible api)
2023-01-06Core/Misc: Remove boost::container::small_vector from header filesShauren
2022-06-10Core/Metric: Sync default Metric.Interval valuejackpoz
Sync default Metric.Interval value in C++ with the value in worldserver.conf (cherry picked from commit c83d00a645a310c48abd454b68402d366773c4d1)
2022-06-10Core/Metric: Fixed double logging metric timersShauren
(cherry picked from commit 46b1284f61310a441f2fb219891c6a2f2e4a218e)
2022-06-10Core/Metric: Build fix for WITH_DETAILED_METRICSShauren
(cherry picked from commit 46b7a361eeef35402f3f9ca52dd2b68e20b161ec)
2022-06-10Core/Metric: Minor optimizations for metrics (reducing number of allocations)Shauren
(cherry picked from commit caaedbfa80870b10d58e124dd6bc6a637278da59)
2022-03-05Core: whitespace cleanup, reduce double blank line to single (#25795)Kargatum
* Core/Misc: fix double empty line * worldserver.conf (cherry picked from commit a32b6b8ac4c81128a56b282f20837fb085bdd9e7)
2022-02-27Common/Metric: Fix build with PERFORMANCE_PROFILING and/or WITHOUT_METRICSAokromes
(cherry picked from commit 91cda8b1cdf4b45c4ca3ef1a742f6d1733ad3d66)
2022-02-13Core/Misc: Cleanup unused includesShauren
2022-02-04Core/Common: Tokenizer -> Trinity::Tokenize (PR: #25327)Treeston
(cherry picked from commit 534a2388b7c662c8796aabb1ec8cb424879799b6)
2022-01-26Core/Metric: Require WITH_DETAILED_METRICS CMake flag for MMaps metricjackpoz
(cherry picked from commit 8ad6bd8a9ba45ef22ed0275fd402da17666d8522)
2022-01-24Core/Metric: Add new metric in World::UpdateSessions()jackpoz
Add new metric about how long adding sessions took (cherry picked from commit 5cd93df9eec1d1b310916fefecc9282e02e9cf2d)
2022-01-24Core/Metric: Log detailed metrics about each opcode handler (#25153)Giacomo Pozzoni
* Core/Metric: Log detailed metrics about each opcode handler * Add new panel to Performance profiling dashboard and use fill(0) instead of fill(none) * Add new settings Metric.Threshold.* to be able to specify the minimum threshold for the specified metrics * Update dashboard * Change thresholds to be required to send the metrics. A TC_METRIC_DETAILED_TIMER metric with an expected threshold not configured will be ignored * Use typedef Milliseconds * Refresh realms on load (cherry picked from commit 8a2c79c850199a73fd431d04f83d6aa89733060d)
2022-01-24Core/Metric: Add new cmake option WITH_DETAILED_METRICS to enable more ↵Giacomo Pozzoni
metrics (#25136) * Core/Metric: Add new cmake option WITH_DETAILED_METRICS to enable more metrics Add more detailed metrics in World::UpdateSessions(). * Attempt using C++17 features * Fix cmake typo Co-authored-by: NoName <322016+Faq@users.noreply.github.com> * Fix build with WITHOUT_METRICS * Update Performance profiling dashboard with Update sessions panel * Add panel to show sessions with update time above 100 ms * Move legends on the right and add max update time diff in the legend of sessions Co-authored-by: NoName <322016+Faq@users.noreply.github.com> (cherry picked from commit 36ef487a90d0d14c4da8ce7e19b5916b8b15056c)
2022-01-23Core/Metric: Add more metrics about World::Update() loop (#25098)Giacomo Pozzoni
* Core/Metric: Add more metrics about World::Update() loop * Add new Performance profiling grafana dashboard * Add new cmake setting WITHOUT_METRICS that disables all metrics As new metrics are added, someone might want to disable them if unused. * Add more metrics about World::Update() loop * Remove old performance profiling features Remove "server set difftime" command, "-RecordUpdateTimeDiffInterval" and "MinRecordUpdateTimeDiff" worldserver config settings and their related code. The whole UpdateTime class could be removed too. * Update and rename 2020_07_99_99_world.sql to 2020_07_24_00_world.sql (cherry picked from commit 3c0ac7302f902d1811d2c215217a3d701f8b5b19)
2022-01-23Core/Metric: Log Map::Update() times (#25067)Giacomo Pozzoni
* Core/Metric: Log Map::Update() times * Add more performant version to reduce allocations when metrics are disabled * Linux build fix * Add metric stopwatch version that doesnt let users forget to _END it * Fix linux build * Code cleanup * Add Map updates panel to General dashboard * Add "Recent events" panel to General dashboard * Apply latest codestyle changes Co-authored-by: Shauren <shauren.trinity@gmail.com> (cherry picked from commit 5eb742ee6a892b684b0c4cbde9f02f838b8300e5)
2022-01-23Core/Time: Rename GetGameTime{System, Steady}Point methodsTreeston
The names are a bit unhandy. Rename them (shorter but still meaningful). GetGameTimeSystemPoint() -> GetSystemTime() GetGameTimeSteadyPoint() -> Now() Also add 2 new typedefs: typedef std::chrono::steady_clock::time_point TimePoint; typedef std::chrono::system_clock::time_point SystemTimePoint; Closes #25042 (cherry picked from commit 896b68d5c297b06587645caebc98b704978ecaa7)
2022-01-06Log number of Creatures and GameObject per map (#24809)Giacomo Pozzoni
* 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 (cherry picked from commit 4e1dbd1cf808c9cf1f310b6d498f7e304dfb4147)
2021-12-02Shared/Metric: Fix a rare memory leakjackpoz
Fix a memory leak in Metric happening only when enabling/disabling Metric from configs at runtime, leaking the metric added between last SendBatch() call and the ScheduleSend() call in the same function. The only way to reproduce this is to actually freeze the thread calling SendBatch(), disable metric, reload config, unfreeze the thread. (cherry picked from commit 0d1ff7446dce7b0641f49ac55a008669838612cd)
2021-08-08Core/Misc: Add PERFORMANCE_PROFILING CMake optionjackpoz
Add a new CMake option called PERFORMANCE_PROFILING that should be used only when profiling the performance. This option is unsupported, do not report any issue happening when enabling this option. (cherry picked from commit db5c9867e2ffde3657f53bc155b474c5d46884dd)
2021-03-15Shared/Metric: Fix crash on shutdownjackpoz
Fix crash on shutdown with metrics enabled but InfluxDB stopping before worldserver (cherry picked from commit 45b2bcfaf266cac74806ed71f32b8dc02cd2321e)
2021-02-25Shared/Metric: Stop metrics on shutdownjackpoz
Properly stop metric information gathering and sending on shutdown. Issue reported by AddressSanitizer. (cherry picked from commit e9c475d45f7fbe78d68e8d0cafe66b829acb6ce6)
2020-09-04Core/Misc: Port all the refactors sneaked in master to 3.3.5 include cleanup ↵Shauren
port
2020-06-23Core/Misc: Replace Trinity::make_unique with std (#24869)Peter Keresztes Schmidt
2020-01-02New YearAokromes
2019-04-14Core/Dep: Boost 1.70 compatibilityShauren
2019-01-01Update copyright note for 2019vincent-michael
auto happy = new year(2019);
2018-01-06Core/Misc: Added compatibility layer for boost 1.66 and future std:: ↵Shauren
networking stuff * Based on work done by @dimiandre in PR #21173 Closes #21171 Closes #21173
2018-01-01Update copyright note for 2018vincent-michael
auto happy = new year(2018);
2017-05-11Core/Common: Include cleanupShauren
2017-03-04Core/Misc: Prefix all preprocessor defines from CompilerDefs with TRINITY_ ↵Shauren
to avoid conflicts (PLATFORM_WINDOWS is used/defined by CascLib)
2017-01-01Update copyright note for 2017vincent-michael
Happy new year
2016-11-14Shared/Metric: Initial support for tag value escapingjackpoz
Fix #18175 (cherry picked from commit 189edc0f23a2935747eb5eb3555607f4edc15480)
2016-06-04Implement real time statistic visualization (#16956)DDuarte
Docs at https://trinitycore.atlassian.net/wiki/display/tc/Monitoring+a+TrinityCore+server * Common/Graphs: Initial proof of concept * Move influx db code to its own class * Reuse the same socket * Allow to log values of different categories * Allow to log events * Pass the timestamp to influxdb * Send events in batches * Send data async * Log server shutdown. Fix memory leak. * Allow to enable/disable Stats in the settings and at runtime * Read interval between each batch send from config * Add InfluxDB connection info to configs * Move each event category to its own table * Log pathfinding queries * Move categories table initialization to constructor using enum as key to avoid assigning the table name to the wrong enum value * Log player login/logout events. Pass the hostname correctly in the HTTP request. * Fix linux build * Handle "Connection: close" HTTP header, reconnecting on next scheduled send. Disable StatsLogger if connection fails, logging the error. * Add an enum for categories of logged values, it's still possible to pass a string instead of the enum. * Don't log the whole batchedData when InfluxDB returns an error, it's too long and unreadable on console. * Allow to call a function at a specified interval in thread-safe World::Update() context to log data like player count. * Log map tile load/unload * Core/StatsLogger: Allow logging more value types other than ints https://docs.influxdata.com/influxdb/v0.10/write_protocols/write_syntax/ * Fix a typo in string escape of StatsLogger * Yet more fixes to the escaping in FormatInfluxDBValue * DB/Gameobject: Fix respawn time of few Quest GameObjects By Tauriella, closes #16701 * DB/Misc: Fix some engrish By tkrokli closes #16648 * Tools/MMaps: Add format library linking to mmaps_generator (Very) partial cherry pick of ed75b0649add23e082976fa4e5d504bc0c312602 * Core/StatsLogger: Simplify code Convert values and categories arrays to maps initialized in-place Remove constructor and destructor * Core/StatsLogger: Add realm name to the event and value tags * Log amount of processed packet of each session * Apply recent singleton changes to sStatsLogger too * Fix influxdb data format if no realm name is present * Remove unneeded newlines from request body, fixes response 400 from InfluxDB 0.10 * Rename Reporting folder to Metric * Rename StatsLogger to Metric * Rename InfluxDB configs to Metric * Add Grafana dashboards * Add a random annoying macro * Move string formatting to Metric::SendBatch(), reducing performance footprint of Metric::LogEvent() and Metric::LogValue() * Update grafana graphs refresing tags on load and showing now-15m data, refreshing every minute. These settings can be modified in grafana. * Rename MetricData fields * Contrib/Grafana: Rename dashboard files * Contrib/Grafana: Replace hardcoded Windows/Ubuntu realm names by the default, Trinity * Config/Worldserver: Add missing section to the index * Contrib/Grafana: Add singlestat panels with current online players, update diff averages (1 min, 5 mins and 15 mins) http://i.imgur.com/Zi8lfvS.png * Core/Metric: Replace the enums MetricEventCategory and MetricValueCategory by strings For the sake of simplicity and less recompile time when adding new metrics, similar to how TC_LOG_* works * Contrib/Grafana: Display the current number of online players and not its average Closes #15075 (cherry picked from commit 3ae10160820782d039c3449107960108fb3a63b9) # Conflicts: # src/server/game/Server/WorldSession.cpp # src/server/game/World/World.cpp # src/server/worldserver/Main.cpp