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
|
@ -4096,10 +4096,9 @@ void dedicated_server_loop(Server &server, bool &kill)
|
|||
/*
|
||||
Profiler
|
||||
*/
|
||||
if (profiler_print_interval != 0) {
|
||||
if(m_profiler_interval.step(steplen, profiler_print_interval))
|
||||
{
|
||||
infostream<<"Profiler:"<<std::endl;
|
||||
if (profiler_print_interval > 0) {
|
||||
if (m_profiler_interval.step(steplen, profiler_print_interval)) {
|
||||
infostream << "Profiler:" << std::endl;
|
||||
g_profiler->print(infostream);
|
||||
g_profiler->clear();
|
||||
}
|
||||
|
@ -4112,6 +4111,12 @@ void dedicated_server_loop(Server &server, bool &kill)
|
|||
ServerList::sendAnnounce(ServerList::AA_DELETE,
|
||||
server.m_bind_addr.getPort());
|
||||
#endif
|
||||
|
||||
if (profiler_print_interval > 0) {
|
||||
infostream << "Profiler:" << std::endl;
|
||||
g_profiler->print(infostream);
|
||||
g_profiler->clear();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue