1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-22 14:24:33 +01:00

Implement profiler (#16194)

* Implement profiling API

* Add console commands for the profiler

* Remove accidental line

* Correct csv output

* Add copyright notice

* Add missing override

* Add default virtual destructor

* Explicitly pass template argument

* Use static

* Add plugin API for profiler

* Add more profile calls

* Workaround for GCC hopefully

* Add missing static keyword

* Use uint64 for call count

* Reduce name length see if CI passes

* Improve handling of function names

* Work around (broken) static inline variables

* Fix missing include

* Disable profiler for clang 5 and older

* Update copyright date

* Profile UpdateAllMiscEntities

* Apply review suggestions

Co-authored-by: Ted John <ted@brambles.org>
This commit is contained in:
ζeh Matt
2022-01-18 10:21:20 -08:00
committed by GitHub
parent e78704f48f
commit 993b168bfd
28 changed files with 678 additions and 8 deletions

View File

@@ -15,6 +15,7 @@
#include "../entity/Peep.h"
#include "../interface/Viewport.h"
#include "../object/StationObject.h"
#include "../profiling/Profiling.h"
#include "../ride/Ride.h"
#include "../ride/RideData.h"
#include "../ride/Track.h"
@@ -69,6 +70,8 @@ void map_animation_create(int32_t type, const CoordsXYZ& loc)
*/
void map_animation_invalidate_all()
{
PROFILED_FUNCTION();
auto it = _mapAnimations.begin();
while (it != _mapAnimations.end())
{