Commit Graph

160 Commits

Author SHA1 Message Date
Treeston
03b5c17863 Common/Utilities: Move EnumUtils' implementation struct from Trinity::Impl to Trinity::Impl::EnumUtilsImpl. This avoids confusing name clashes for other implementations in sub-namespaces of Trinity::Impl.
(cherry picked from commit 91744de316)
2022-02-04 00:27:12 +01:00
Peter Keresztes Schmidt
3c82863c52 Core/ChatCommands: Check whether a passed numeric enum value is valid (#25285)
(cherry picked from commit 4286e7aa02)
2022-02-03 00:18:48 +01:00
jackpoz
e2fb15fd22 Core/Metric: Include Creatures and Gameobjects panels in the Performance Profiling dashboard
(cherry picked from commit df8d50c06a)
2022-01-26 14:07:16 +01:00
jackpoz
f220e46c50 Core/Metric: Add new metric in World::UpdateSessions()
Add new metric about how long adding sessions took

(cherry picked from commit 5cd93df9ee)
2022-01-24 13:12:21 +01:00
Giacomo Pozzoni
8350985975 Core/Metric: Log detailed metrics about each opcode handler (#25153)
* 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 8a2c79c850)
2022-01-24 13:02:38 +01:00
jackpoz
7a532595da Core/Metric: Fix setting in Performance profiling dashboard
(cherry picked from commit f9972f2473)
2022-01-24 12:45:04 +01:00
Giacomo Pozzoni
21e9fac8bd Core/Metric: Add new cmake option WITH_DETAILED_METRICS to enable more 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 36ef487a90)
2022-01-24 12:21:36 +01:00
Giacomo Pozzoni
e8583d04f6 Core/Metric: Add more metrics about World::Update() loop (#25098)
* 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 3c0ac7302f)
2022-01-23 22:45:25 +01:00
Giacomo Pozzoni
8834c5c724 Core/Metric: Log Map::Update() times (#25067)
* 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 5eb742ee6a)
2022-01-23 21:36:28 +01:00
Giacomo Pozzoni
07f42907c6 Log number of Creatures and GameObject per map (#24809)
* 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 4e1dbd1cf8)
2022-01-06 23:15:07 +01:00
Shauren
3a2eb806f8 Misc: Made gdb crash reporting script more automation friendly
* Don't block on successful exit
* Generate timestamped filenames to avoid overwriting old logs

(cherry picked from commit 58d3f17430)
2022-01-02 16:32:47 +01:00
Shauren
fbedd77fe5 Misc: Improve gdb script output
* Switch disassembly to intel syntax
* Remove terminal colors
* Remove terminal line wrapping and pagination
* Start versioning the script

(cherry picked from commit 0d0d005a2e)
2022-01-01 20:12:36 +01:00
jackpoz
d0e1794d99 CI/Circle CI: Show codestyle instructions
Show a short comment about how to fix the codestyle errors

(cherry picked from commit dcd2ffdaf4)
2022-01-01 01:07:15 +01:00
jackpoz
da25846615 CI/Circle CI: Add codestyle check
Tabs are not allowed, use 4 spaces instead

(cherry picked from commit 5f29577f63)
2022-01-01 01:00:44 +01:00
jackpoz
4df9ab2a3f CI/Circle CI: Add codestyle check
Whitespace at the end of lines is not allowed

(cherry picked from commit 0017c7a082)
2022-01-01 00:52:28 +01:00
jackpoz
363db46c43 CI/Circle CI: Add support to multiline regex
(cherry picked from commit 4f88be63e7)
2021-12-31 21:58:08 +01:00
jackpoz
e485932c45 CI/Circle CI: Add codestyle check
ObjectGuid::GetCounter() should not be called in logs, use ObjectGuid::ToString().c_str() instead
(cherry picked from commit af1260c40e)
2021-12-31 21:56:38 +01:00
jackpoz
8878ba2dca CI/Circle CI: Enforce codestyle checks
(cherry picked from commit 32c9f1c7a2)
2021-12-31 21:56:38 +01:00
Teppic1
69b2937b8c Add bash script for extracting client files (#24215)
* Add bash script for extracting client files

Simple bash script to automate extracting/copying client files on a Linux system.

It follows the instructions on the wiki but additionally copies camera files if found. It includes a few simple checks.

* Update extractor.sh

Client and server directories are now requested unless already set as environment variables.

* Fix client check

* Update contrib/extractor.sh

Clearer error

Co-Authored-By: Trond B. Krokli <38162891+illfated@users.noreply.github.com>

Co-authored-by: Trond B. Krokli <38162891+illfated@users.noreply.github.com>
(cherry picked from commit 1d78fb2cd4)
2021-12-22 22:46:49 +01:00
Aokromes
95b8c9df84 Misc/Extractor: Clarify a bit
(cherry picked from commit 58c5dfac1d)
2021-11-23 22:48:17 +01:00
Treeston
c977087d58 Core/Misc: Partial merge of 3.3.5-dbedit:
- Added SmartEnum.h for enum iteration, stringification, and more, courtesy of krabicezpapundeklu/smart_enum
- Moved a bunch of enums in SharedDefines.h to the new system
- Miscellaneous utility methods ported

Core/Util: Redesign SmartEnum to properly work for large
 enums (>64 entries) and play nice with IDEs (PR #22768)

(cherry picked from commit 338e8ba0fe)
(cherry picked from commit f7ca0877a3)
(cherry picked from commit 207093475a)
(cherry picked from commit ee68cf3392)
(cherry picked from commit c16d461e16)
(cherry picked from commit f6b0d99e2c)
(cherry picked from commit bc1f456125)
2021-11-15 21:34:03 +01:00
Aokromes
b504b47650 Misc: Make extractor more clear for some users
(cherry picked from commit 5fd03bb472)
2021-10-27 00:02:09 +02:00
Shauren
d181c1da75 Core/CrashHandler: Include assertion messages in crash reports
(cherry picked from commit 62db1fb683)
2021-10-23 16:02:44 +02:00
Shauren
d3e1e4be22 Misc: Update protobuf code generator plugin for 4c85198ed6 2020-05-14 10:15:22 +02:00
funjoker
6e324632bc CI/Circle CI: Prepare master for circle ci (#24386)
* Circle CI (#22982)

* Build/CI: Add Circle CI

* Fix travis

(cherry picked from commit cb6439bacd)

* CI/CircleCI: Add parallel no-pch build

(cherry picked from commit 33c58b4aaf)

* CI/CircleCI: Use ccache for nopch

(cherry picked from commit 6bcf5c64c4)

* CI/CircleCI: Change base docker image to custom-built trinitycore one

(cherry picked from commit 37beeb1282)

* CI/CircleCI: Switch to Ubuntu 18.10

(cherry picked from commit 6dfb4fde07)

* CI/CircleCI: Switch to Ubuntu 19.04

(cherry picked from commit 9009c82a8d)

* CI/Circle CI: Reduce ccache size from 5G to 1G

This should speedup Circle CI cache saving and in turn no-pch build

(cherry picked from commit 1b543ac16d)

* CI/Circle CI: Adjust config for master branch

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
2020-04-04 14:58:56 +02:00
Aokromes
b0bf1275ee New Year 2020-01-02 06:44:10 +01:00
vincent-michael
5620eb9463 Update copyright note for 2019
auto happy = new year(2019);
2019-01-01 10:14:33 +01:00
Shauren
126c8cf90f Contrib/Protobuf generator: Updated to new proto format 2018-11-05 17:40:27 +01:00
Aokromes
03c1ce2d1e Make codacy happy 2018-04-08 12:03:37 +02:00
vincent-michael
7d00ae4045 Update copyright note for 2018
auto happy = new year(2018);
2018-01-01 00:40:17 +01:00
Evgeny Frolov
55105c2f87 Contrib/Grafana: updated dashboards (#20563)
Add a single page dashboard including all graphs, useful for Grafana Cloud since it allows to created only a limited number of dashboards.
2017-10-16 13:57:11 +02:00
Shauren
ee7f598e19 Contrib: Updated protobuf service generator with latest async handling changes 2017-09-23 23:11:18 +02:00
joschiwald
84b6b06432 Contrib: Dropped obsolete ScriptConverter 2017-09-06 13:56:03 +02:00
cribolouf
f677c71263 Optimize and Streamline Extractor.bat 2017-07-17 11:29:39 +02:00
tkrokli
f29d0740e6 Contrib/Windows: extractor.bat cleanup
- Missing GOTO label :EOF at the end of the file
- Messages to user are in full English sentences.
2017-07-14 10:01:39 +02:00
Aokromes
d7124f0100 Update extractor.bat 2017-02-25 10:37:22 +01:00
Aokromes
feac31cf52 Tools: Make extractor better, add mmaps extractor multitask 2017-02-11 05:46:13 +01:00
Shauren
cdbe140f91 Contrib: Fix protoc-bnet generator to initialize all fields in the constructor 2017-01-19 17:36:30 +01:00
vincent-michael
86b98686a9 Update copyright note for 2017
Happy new year
2017-01-01 16:23:13 +01:00
DDuarte
da2026e764 Yet more 6.x -> master renames 2016-10-16 20:42:14 +01:00
jackpoz
3f02f9edcd Grafana/Dashboards: Fix General info datasources
Fix General info datasources for counter panels

(cherry picked from commit 911bffd208)
2016-06-04 13:26:22 +02:00
DDuarte
8b26aea95a 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
(cherry picked from commit 3ae1016082)

# Conflicts:
#	src/server/game/Server/WorldSession.cpp
#	src/server/game/World/World.cpp
#	src/server/worldserver/Main.cpp
2016-06-04 11:26:57 +01:00
Naios
e3a583646e Contrib: Fix the check_update scripts after the recent organization changes
* Fixes the travis build
* Ref 8778829a98
2016-04-17 17:36:40 +02:00
Naios
5fa7127927 Core/Proto: Convert the proto project to a standalone shared library
* Fixes issues with dynamic linking on linux
* Closes #16981
2016-04-16 22:07:07 +02:00
Aokromes
32bf8e26f8 Misc/Extractor: Add batch file for extractors
You must copy it to your wow directory with the tools and run it.
Linux version is welcomed.
(cherry picked from commit d55d32fa0f)
2016-04-08 23:54:36 +02:00
Shauren
0d3a81b2bc Contrib: Updated protoc plugin to generate service classes suitable for dynamic linking 2016-03-26 22:01:03 +01:00
Shauren
b97d990dee Contrib: Added .bat file with commands to generate protobuf sources using the plugin 2016-03-26 17:39:39 +01:00
Shauren
e1a68fa34d Clang build fix 2016-03-26 17:38:00 +01:00
Shauren
9018ac978d Core/Shared: Added generated protobuf sources 2016-03-26 17:23:35 +01:00
Shauren
499a159932 Contrib: Added sources of the protoc plugin used to generate services 2016-03-26 01:24:11 +01:00