1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 00:25:19 +02:00

Better F6 profiler (#8750)

Update the profiler names to make more sense of what they actually represent
Move the profiler code from header to its source file
Use monospace font to align lines
Format the statistics line to align better with surrounding values
Refresh the profiler each 3 seconds (roughly)
This commit is contained in:
SmallJoker
2019-08-13 19:56:55 +02:00
committed by GitHub
parent e9ceead81d
commit 539f016c1b
19 changed files with 256 additions and 324 deletions

View File

@@ -35,8 +35,7 @@ void ActiveObjectMgr::clear()
void ActiveObjectMgr::step(
float dtime, const std::function<void(ClientActiveObject *)> &f)
{
g_profiler->avg("Client::ActiveObjectMgr: num of objects",
m_active_objects.size());
g_profiler->avg("ActiveObjectMgr: CAO count [#]", m_active_objects.size());
for (auto &ao_it : m_active_objects) {
f(ao_it.second);
}