diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-12-09 09:07:58 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-12-09 09:07:58 +0100 |
commit | d3753404cdf58e529865782e7e3679aadb5bc18f (patch) | |
tree | 589e2b105e89faca4c1bd6972674f33e23c84d13 /src/test | |
parent | dc7a1c3d669b901adb9c520b4a76a868a3cc94e9 (diff) |
revert #66 except for `src/test/InputTest.cpp`
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/test/Profiling.cpp | 16 |
2 files changed, 10 insertions, 8 deletions
diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt index eae59f2..c9cbac5 100644 --- a/src/test/CMakeLists.txt +++ b/src/test/CMakeLists.txt @@ -13,8 +13,8 @@ target_sources(test_main PUBLIC ValueBrokerTest.cpp DBTest.cpp Vector2Test.cpp - Profiling.cpp InputTest.cpp ScriptEventTest.cpp ScriptSceneTest.cpp + Profiling.cpp ) diff --git a/src/test/Profiling.cpp b/src/test/Profiling.cpp index d40ee1d..c753bca 100644 --- a/src/test/Profiling.cpp +++ b/src/test/Profiling.cpp @@ -1,3 +1,7 @@ +#include "manager/Mediator.h" +#include "system/ParticleSystem.h" +#include "system/PhysicsSystem.h" +#include "system/RenderSystem.h" #include <chrono> #include <cmath> #include <gtest/gtest.h> @@ -17,10 +21,6 @@ #include <crepe/system/ScriptSystem.h> #include <crepe/types.h> #include <crepe/util/Log.h> -#include "manager/Mediator.h" -#include "system/ParticleSystem.h" -#include "system/PhysicsSystem.h" -#include "system/RenderSystem.h" using namespace std; using namespace std::chrono_literals; @@ -47,7 +47,7 @@ public: // Minimum amount to let test pass const int min_gameobject_count = 100; // Maximum amount to stop test - const int max_gameobject_count = 1000; + const int max_gameobject_count = 150; // Amount of times a test runs to calculate average const int average = 5; // Maximum duration to stop test @@ -98,8 +98,10 @@ public: std::chrono::microseconds run_all_systems() { std::chrono::microseconds total_microseconds = 0us; total_microseconds += time_function("PhysicsSystem", [&]() { physics_sys.update(); }); - //total_microseconds += time_function("CollisionSystem", [&]() { collision_sys.update(); }); - total_microseconds += time_function("ParticleSystem", [&]() { particle_sys.update(); }); + total_microseconds + += time_function("CollisionSystem", [&]() { collision_sys.update(); }); + total_microseconds + += time_function("ParticleSystem", [&]() { particle_sys.update(); }); total_microseconds += time_function("RenderSystem", [&]() { render_sys.update(); }); return total_microseconds; } |