1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Print profiler at end of session

This commit is contained in:
sfan5 2024-04-11 12:42:12 +02:00
parent 72eeb9fecb
commit 4027e08cc8
3 changed files with 21 additions and 8 deletions

View file

@ -258,6 +258,13 @@ bool ClientLauncher::run(GameStartData &start_data, const Settings &cmd_args)
}
} // Menu-game loop
// If profiler was enabled print it one last time
if (g_settings->getFloat("profiler_print_interval") > 0) {
infostream << "Profiler:" << std::endl;
g_profiler->print(infostream);
g_profiler->clear();
}
assert(g_menucloudsmgr->getReferenceCount() == 1);
g_menucloudsmgr->drop();
g_menucloudsmgr = nullptr;