mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-12 16:58:39 +00:00
Some more profiler stuff to get the hang on what really uses CPU
This commit is contained in:
parent
b8f2dcea4d
commit
2419d0029a
5 changed files with 66 additions and 24 deletions
|
@ -21,6 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "collision.h"
|
||||
#include "environment.h"
|
||||
#include "settings.h"
|
||||
#include "profiler.h"
|
||||
|
||||
core::map<u16, ServerActiveObject::Factory> ServerActiveObject::m_types;
|
||||
|
||||
|
@ -137,6 +138,8 @@ ServerActiveObject* ItemSAO::create(ServerEnvironment *env, u16 id, v3f pos,
|
|||
|
||||
void ItemSAO::step(float dtime, bool send_recommended)
|
||||
{
|
||||
ScopeProfiler sp2(g_profiler, "ItemSAO::step avg", SPT_AVG);
|
||||
|
||||
assert(m_env);
|
||||
|
||||
const float interval = 0.2;
|
||||
|
@ -291,6 +294,8 @@ ServerActiveObject* RatSAO::create(ServerEnvironment *env, u16 id, v3f pos,
|
|||
|
||||
void RatSAO::step(float dtime, bool send_recommended)
|
||||
{
|
||||
ScopeProfiler sp2(g_profiler, "RatSAO::step avg", SPT_AVG);
|
||||
|
||||
assert(m_env);
|
||||
|
||||
if(m_is_active == false)
|
||||
|
@ -480,6 +485,8 @@ ServerActiveObject* Oerkki1SAO::create(ServerEnvironment *env, u16 id, v3f pos,
|
|||
|
||||
void Oerkki1SAO::step(float dtime, bool send_recommended)
|
||||
{
|
||||
ScopeProfiler sp2(g_profiler, "Oerkki1SAO::step avg", SPT_AVG);
|
||||
|
||||
assert(m_env);
|
||||
|
||||
if(m_is_active == false)
|
||||
|
@ -752,6 +759,8 @@ ServerActiveObject* FireflySAO::create(ServerEnvironment *env, u16 id, v3f pos,
|
|||
|
||||
void FireflySAO::step(float dtime, bool send_recommended)
|
||||
{
|
||||
ScopeProfiler sp2(g_profiler, "FireflySAO::step avg", SPT_AVG);
|
||||
|
||||
assert(m_env);
|
||||
|
||||
if(m_is_active == false)
|
||||
|
@ -1065,6 +1074,8 @@ static void explodeSquare(Map *map, v3s16 p0, v3s16 size)
|
|||
|
||||
void MobV2SAO::step(float dtime, bool send_recommended)
|
||||
{
|
||||
ScopeProfiler sp2(g_profiler, "MobV2SAO::step avg", SPT_AVG);
|
||||
|
||||
assert(m_env);
|
||||
Map *map = &m_env->getMap();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue