From a936a998fd6441679f123850bf4b62178ad4336e Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 28 Aug 2023 14:03:44 +0200 Subject: shaders/tuc: output stats every few seconds --- editor/draw.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'editor') diff --git a/editor/draw.cpp b/editor/draw.cpp index f54d6b49..097a9deb 100644 --- a/editor/draw.cpp +++ b/editor/draw.cpp @@ -8,11 +8,14 @@ #include "src/camera-offset.hpp" #include "src/world.hpp" #include "character.hpp" + #include "rotation.inl" +#include "src/RTree-search.hpp" + +#include #include #include #include -#include "src/RTree-search.hpp" namespace floormat { @@ -191,6 +194,19 @@ void app::draw() draw_cursor(); draw_ui(); render_menu(); + + using namespace std::chrono_literals; + { + constexpr auto print_every = 4s; + + static auto t0 = std::chrono::high_resolution_clock::now(); + auto t = std::chrono::high_resolution_clock::now(); + if (t - t0 >= print_every) + { + t0 = t; + M->texture_unit_cache().output_stats(); + } + } } clickable* app::find_clickable_scenery(const Optional& pixel) -- cgit v1.2.3