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:
parent
72eeb9fecb
commit
4027e08cc8
3 changed files with 21 additions and 8 deletions
|
@ -1904,7 +1904,8 @@ void Game::updateProfilers(const RunStats &stats, const FpsControl &draw_times,
|
|||
g_settings->getFloat("profiler_print_interval");
|
||||
bool print_to_log = true;
|
||||
|
||||
if (profiler_print_interval == 0) {
|
||||
// Update game UI anyway but don't log
|
||||
if (profiler_print_interval <= 0) {
|
||||
print_to_log = false;
|
||||
profiler_print_interval = 3;
|
||||
}
|
||||
|
@ -1919,12 +1920,12 @@ void Game::updateProfilers(const RunStats &stats, const FpsControl &draw_times,
|
|||
g_profiler->clear();
|
||||
}
|
||||
|
||||
// Update update graphs
|
||||
// Update graphs
|
||||
g_profiler->graphAdd("Time non-rendering [us]",
|
||||
draw_times.busy_time - stats.drawtime);
|
||||
|
||||
g_profiler->graphAdd("Sleep [us]", draw_times.sleep_time);
|
||||
g_profiler->graphAdd("FPS", 1.0f / dtime);
|
||||
|
||||
g_profiler->graphSet("FPS", 1.0f / dtime);
|
||||
}
|
||||
|
||||
void Game::updateStats(RunStats *stats, const FpsControl &draw_times,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue