Commit Graph

17 Commits

Author SHA1 Message Date
jackpoz
2585c62e6f Tools/MMapGenerator: Avoid saving uninitialized padding bytes to disk
Initialize padding bytes in MmapTileHeader struct to avoid saving uninitialized data to disk, causing issues when binary-comparing *.mmtile files.
2016-08-17 15:07:02 +02:00
Naios
68015599dc Core/Common: Converted the common library to a shared library.
* There is still the possibility to static link against common.

(cherry picked from commit 501fd9b502)

# Conflicts:
#	src/common/Collision/Management/MMapManager.h
#	src/common/Collision/VMapTools.h
#	src/common/Common.cpp
#	src/common/Common.h
#	src/common/Cryptography/Authentication/PacketCrypt.h
#	src/common/Cryptography/Authentication/WorldPacketCrypt.h
#	src/common/Cryptography/HmacHash.cpp
#	src/common/Cryptography/HmacHash.h
#	src/common/Cryptography/SHA256.h
#	src/common/GitRevision.h
#	src/common/Utilities/Random.h
#	src/common/Utilities/Util.h
2016-08-08 18:00:32 +02:00
jackpoz
25dc3dd7a2 Common/Maps: Reduce differences between 3.3.5 and 6.x branches
Code functionality shouldn't have been modified.
2016-08-03 22:35:44 +02:00
jackpoz
6ce252f80a Common/Maps: Reduce differences between 3.3.5 and 6.x branches
Code functionality shouldn't have been modified.
2016-08-03 18:29:57 +02:00
jackpoz
d77e76c584 Common/MMaps: Reduce differences between 3.3.5 and 6.x branches
Code functionality shouldn't have been modified.
2016-08-03 15:45:44 +02:00
ariel-
2efd40b804 Core/Misc: remove unused function prototype 2016-07-16 20:38:34 -03:00
jackpoz
1347d7cf7a Core/VMaps: Fix some vmap height edge cases
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-04 15:01:39 +02:00
Duarte Duarte
3ae1016082 Implement real time statistic visualization (#16956)
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 ed75b0649a

* 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-06-04 11:23:29 +01:00
Shauren
39abb8acb3 Core/Misc: MSVC warning fixes
(cherry picked from commit 70412e7e25)
2016-04-09 18:13:30 +02:00
Naios
1a1c0d1dc4 Core/Common: Converted the common library to a shared library.
* There is still the possibility to static link against common.

(cherry picked from commit 501fd9b502)
2016-03-24 02:45:44 +01:00
Naios
998607b106 Core/Common: Move singleton instances into compilation units
* Fixes issues when building shared libraries
  (prevents gcc and clang from providing several instance)

(cherry picked from commit 5c91586797)
2016-03-11 18:55:33 +01:00
Rushor
923a368ac7 Update copyright note for 2016 2016-01-01 12:02:33 +01:00
Shauren
b1b72dafd0 Warning fixes
(cherry picked from commit 82db416b5d)
2015-10-29 18:56:26 +01:00
Naios
d96db56f03 Core/Tools: Fix brutal linking in mmaps extractor.
* caused warnings with shared linking
* ref #15671

(cherry picked from commit 13654bac2c)
2015-10-29 18:56:25 +01:00
StormBytePP
7b245a0b6b Core: Added ABORT() macro to prevent the usage of ASSERT(false) as a quick hack to crash the core misusing assert 2015-09-21 15:11:06 +02:00
StormBytePP
405f823f68 Core/BuildSystem: Merged crypto and gitrevision into common, cleaned include directory lists (to mimic 6.x buildsystem) 2015-08-24 03:38:54 +02:00
StormBytePP
1f66d719f2 Core/BuildSystem: Merge collision, debugging, threading, utilities and configuration into "common" which does not depend on shared anymore and moved database out of shared library
These changes enables to build tools only without even having MySQL installed
2015-08-16 21:23:15 +02:00