aboutsummaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)Author
2016-07-16Core/Misc: remove unused function prototypeariel-
2016-07-03Core/EventProcessor: Check whether an event was aborted before aborting it.Naios
* Fixes an assertion introduced in commit 1ad73212dca0cf. * Use itr = std::unordered_map<...>::erase for updating the iterator.
2016-07-03Core/Crash reporting: Better handle max nesting level settingjackpoz
Fix wheaty exception report counting reference symbols as 2 nesting levels, not logging child objects in some cases, i.e. spell id in SpellEvent crash.
2016-07-03Core/EventProcessor: Wait for non deletable events to get deletable.Naios
* Immediate deletion caused issues with the SpellEvent, so we delete it at one of the next update ticks now. * Only affects the unforced cancellation of events. * Ref #16675
2016-06-23Core/Common: Add the linkage type to the version stringNaios
* Add platform strings for intel and apple * Remove usage of underscore uppercase identifiers because those are reserved for the compiler. * Requested by Aokromes (cherry picked from commit afa0bac669ac787e6bd35273c967a58b3e4e2196)
2016-06-04Core/VMaps: Fix some vmap height edge casesjackpoz
Fix Map::GetWaterOrGroundLevel() checking dynamic object only in phase 1 instead of current Unit phase. Improve DynamicMapTree::getHeight() dynamic object check by casting the ray at +0.5f from the passed Z coordinate, this value will be tuned to improve even more the results.
2016-06-04Implement real time statistic visualization (#16956)Duarte Duarte
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
2016-05-24Core/Containers: Warning fixes and RandomResizeList with predicate optimizationShauren
2016-05-10Core/Game: Remove some unnecessary export macrosNaios
2016-05-10Core/Common: Move the query callback header to the database projectNaios
* Also renames the header to it's correct name QueryCallback
2016-04-30Core/Utilities: Inherit env vars when starting external processesNaios
2016-04-26Core/Misc: Use steady_clock instead of system_clock for calculating ms ↵Shauren
timers. This makes update diffs immune to systemwide time changes (cherry picked from commit 406ac4f4b492e8733d0c1e6142838b3fff8c80a3)
2016-04-24Core/Utils: replaced std::random_shuffle with our own implementation using ↵joschiwald
SFMT random generator
2016-04-23Core/Common: Fix a std::string -> char* -> std::string conversionNaios
* Thanks jackpoz for noticing
2016-04-18Core/Scripting: Use the path of the worldserver executable to search for the ↵Naios
scripts dir * Fixes issues when starting the worldserver not in the bin directory or the CMAKE_INSTALL_PREFIX directory using the -c option.
2016-04-17Core/Cryptography: Move the SHA1 calculate helper to the SHA1 headerNaios
2016-04-11Core/Common: Capsule boost process into helper functionsNaios
* For easier usage, the processes output it routed correctly to the TC logger line by line now. * Add support for asynchronous process execution and process termination. (cherry picked from commit 3497b4960ba944388d148e10084e62eee909e986)
2016-04-11Core/Misc: Replace tc's optional with boost::optional. (very partial ↵Naios
cherry-pick) * benefits from empty optimization (objects are only constructed if needed). * supports r-value references (move semantics) (boost >= 1.56.0). * preparation for c++14/17's std::optional and std::none_t. * add move constructor to CompactArray. (cherry picked from commit 800d5d893964a82265577d3352d683035b589f78)
2016-04-09Core/Misc: MSVC /W4 warning fixesShauren
(cherry picked from commit 08c27d3205a6dc825512757ab88acf0e4379fe75)
2016-04-09Core/Misc: MSVC warning fixesShauren
(cherry picked from commit 70412e7e254a36398f101b4bfe1926c619063202)
2016-04-09Buildsystem: Initial changes to support building with vs clang toolsetShauren
(cherry picked from commit 4a3a178d7fe9d2d7e8fde2fe915cf5cec5223502)
2016-04-09Core/Common: Moved MessageBuffer to commonShauren
(cherry picked from commit a81a204678f4cbd8b8a53333600f50f0b494706a)
2016-03-31Core/Config: Fix 3 more missing config warningsDDuarte
Closes #16861 Thanks tkrokli (cherry picked from commit 0afcefea2724081968b07119ebd54943fdc44b60)
2016-03-31Core/Config: Error logging for ptree_bad_dataDDuarte
Ref https://github.com/TrinityCore/TrinityCore/commit/6487e2f2d6a1ddbeff77362219658376b8a3f9f0#commitcomment-16888976 (cherry picked from commit 9431b94bff939457cb915da3728cda6067674558)
2016-03-27Core/Startup: Warn when a config key isn't found in the config filesDDuarte
Example: "Missing name Guild.SaveInterval in config file worldserver.conf, add "Guild.SaveInterval = 15" to this file" (cherry picked from commit 06b3bca0d2bf6f049128da110681a5244d90225a) # Conflicts: # src/common/Configuration/Config.cpp
2016-03-24Core/Common: Converted the common library to a shared library.Naios
* There is still the possibility to static link against common. (cherry picked from commit 501fd9b50232ca3ae3623877c3e521c9c1f894be)
2016-03-24Core/Build: Add the possibility to link libraries dynamically.Naios
* makes it possible to access exported singletons from other shared lib's. * reduces binary size (cherry picked from commit f4e0945b13a70225684e7421d9542efae6a47c89)
2016-03-21Core/Util: Extracted GetPID to separate functionShauren
(cherry picked from commit e3af42e05cdf9e4c959d4e038349008da4faca27)
2016-03-18CMake: Use inherited dependencies in common and toolsNaios
2016-03-16Dep/CppFormat: Update cppformat to cppformat/cppformat@5174b8cNaios
2016-03-12Core/Misc: fix buildMitchesD
(cherry picked from commit ce5def332fa12ea4b2f3223fbaa4e41750da9cfb)
2016-03-12Core/Debugging: Make abort() less bad on windows by forcing crash log generationShauren
(cherry picked from commit dea7d429abe5143672154784f93e4b19020062d5) # Conflicts: # src/server/bnetserver/Main.cpp
2016-03-12Core/Logging: Force synchronous logging after io_service shutdown - fixes ↵Shauren
logging on worldserver shutdown (cherry picked from commit a0b2be6c1d0ae17ad8a17692d77f2020bbb9296e)
2016-03-12Core/PacketIO: Requeue packets handled with STATUS_LOGGEDIN received before ↵Shauren
player is fully loaded in one step after packet processing loop - reduces used locks from 3 per packet to 1 per packet (cherry picked from commit 8086a39210659c44d52fb463f5a39f047aa45685)
2016-03-12Core: Revert failVincent-Michael
(cherry picked from commit b5329d8a0394888fdf955afe0ac726ad63534220)
2016-03-12Core: Added missing overridesVincent-Michael
(cherry picked from commit 5d584116feab33ac04135e46ba9b43738a02e106)
2016-03-12Core/Misc: Partial port of d9f1d6466dbb16fdbc792fe42a92c18ec29dfb48 ↵Shauren
(refactoring)
2016-03-11Core/Common: Generalize platform specific includes in common/PlatformNaios
(cherry picked from commit 30517cb1d3b27d5abb8632d863797aa5749199a6)
2016-03-11Core/Common: Move singleton instances into compilation unitsNaios
* Fixes issues when building shared libraries (prevents gcc and clang from providing several instance) (cherry picked from commit 5c91586797f199259567629a1d4d3f987c73e53c)
2016-03-01Util/Random: Add randtime(Milliseconds const&, Milliseconds const&) to ↵treeston
supersede urandms(uint32,uint32) for scripts being ported to std::chrono.
2016-02-27Scripts/Spells: Glyph of Arcane Shot is affected by own debuffs on target onlyjoschiwald
2016-02-27Core/Logging: fixed default logger (partial reverts ↵joschiwald
0904858624297bb6098bde7d22fd080245dd8d5a)
2016-02-22Core/Common: Add a generic config helper to access built-in overwriteable paths.Naios
* Adds CMAKE_COMMAND and CMAKE_BINARY_DIR to revision_data.h * Move the source and mysql exe path handling out of the DBUpdater. * Make some Config methods const for correctness. * Remove C & CXX flags from revision_data.h (was unused and didn't capture all cxx vars) * Reorder the link order to prevent `ld` from ignoring the file * Ref #15671 (cherry picked from commit 719159e2074ac2d0902c70bdd3c7a39e0d311bbe)
2016-02-20Core/Networking: Rewrite networking threading modelShauren
Each network thread has its own io_service - this means that all operations on a given socket except queueing packets run from a single thread, removing the need for locking Sending packets now writes to a lockfree intermediate queue directly, encryption is applied in network thread if it was required at the time of sending the packet (cherry picked from commit 97a79af4701621ec04b88c8b548dbc35d120e99e)
2016-02-09Core/Utils: Moved rng functions to separate header and added utility ↵Shauren
functions to select a random element from a container where each element can have different chance of being selected (cherry picked from commit ae20b2ab561bc07d85f443ae914bc597c9d6ac6e) (cherry picked from commit 921d893c2a82eb6ac0762bf7001df87911b44611) (cherry picked from commit 9ab10d6e680ca835d1dfdfbceb9f18f330f994fc) (cherry picked from commit 00c878e73a8c6b8ce3339d224ab5611df3bbd07c) (cherry picked from commit ff9c999334d87acc3fcea9737753c30b7f1abe25) (cherry picked from commit bc94bacce404401a480b6871eaa7bc38d766014c) (cherry picked from commit d5b0ffbe9b0c07beb8d0dfc52a6532c2da805285)
2016-01-22Core/Util: Add a missing includeCarbenium
2016-01-01Update copyright note for 2016Rushor
2015-11-28Core/Util: Add a urandms(min,max) helper to make urand(min*IN_MILLISECONDS, ↵treeston
max*IN_MILLISECONDS) shorter to write for random time intervals (boss scripts).
2015-11-14Core/DBLayer: Improve error message from ↵Shauren
0a27f8bce264b8f6d8c55efa8ebc97f6e9cb7d11 (cherry picked from commit d31706b07e5e4a4d632f5deea7076e864b467bbe)
2015-11-07Core: Whitespace cleanupVincent-Michael