diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-03 16:04:17 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-03 16:04:17 +1000 |
commit | 11e00a8dedd8f430f6528d2852169d134c17367a (patch) | |
tree | b8a8bb9fdf7e29f48777c0abebb3d7c8449d0a4c /source/client/StarClientApplication.cpp | |
parent | 8ee9c97f54b210f9bb74b6a3c4f32f91b1620f13 (diff) |
Change debug render time logging to use microseconds
Diffstat (limited to 'source/client/StarClientApplication.cpp')
-rw-r--r-- | source/client/StarClientApplication.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/source/client/StarClientApplication.cpp b/source/client/StarClientApplication.cpp index 7a813c4..ebaa211 100644 --- a/source/client/StarClientApplication.cpp +++ b/source/client/StarClientApplication.cpp @@ -386,20 +386,26 @@ void ClientApplication::render() { WorldClientPtr worldClient = m_universeClient->worldClient(); RendererPtr renderer = Application::renderer(); if (worldClient) { - int64_t start = Time::monotonicMilliseconds(); - + auto start = Time::monotonicMicroseconds(); renderer->switchEffectConfig("world"); worldClient->render(m_renderData, TilePainter::BorderTileSize); + LogMap::set("render_world_client", strf(u8"{:05d}s", Time::monotonicMicroseconds() - start)); + + start = Time::monotonicMicroseconds(); m_worldPainter->render(m_renderData, [&]() { worldClient->waitForLighting(); }); + LogMap::set("render_world_painter", strf(u8"{:05d}s", Time::monotonicMicroseconds() - start)); + + start = Time::monotonicMicroseconds(); m_mainInterface->renderInWorldElements(); + LogMap::set("render_world_elements", strf(u8"{:05d}s", Time::monotonicMicroseconds() - start)); renderer->switchEffectConfig("default"); - LogMap::set("render_world", strf("{}ms", Time::monotonicMilliseconds() - start)); + LogMap::set("render_world_total", strf(u8"{:05d}s", Time::monotonicMicroseconds() - start)); } - int64_t start = Time::monotonicMilliseconds(); + auto start = Time::monotonicMicroseconds(); m_mainInterface->render(); m_cinematicOverlay->render(); - LogMap::set("render_ui", strf("{}ms", Time::monotonicMilliseconds() - start)); + LogMap::set("render_interface", strf(u8"{:05d}s", Time::monotonicMicroseconds() - start)); } if (!m_errorScreen->accepted()) |