mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Profiler graph
This commit is contained in:
parent
2f2ef80ec2
commit
7d1ac4d1f6
3 changed files with 214 additions and 40 deletions
|
@ -656,9 +656,11 @@ void Client::step(float dtime)
|
|||
/*infostream<<"Mesh update result queue size is "
|
||||
<<m_mesh_update_thread.m_queue_out.size()
|
||||
<<std::endl;*/
|
||||
|
||||
|
||||
int num_processed_meshes = 0;
|
||||
while(m_mesh_update_thread.m_queue_out.size() > 0)
|
||||
{
|
||||
num_processed_meshes++;
|
||||
MeshUpdateResult r = m_mesh_update_thread.m_queue_out.pop_front();
|
||||
MapBlock *block = m_env.getMap().getBlockNoCreateNoEx(r.p);
|
||||
if(block)
|
||||
|
@ -699,6 +701,8 @@ void Client::step(float dtime)
|
|||
m_con.Send(PEER_ID_SERVER, 1, reply, true);
|
||||
}
|
||||
}
|
||||
if(num_processed_meshes > 0)
|
||||
g_profiler->graphAdd("num_processed_meshes", num_processed_meshes);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -752,6 +756,7 @@ void Client::ReceiveAll()
|
|||
|
||||
try{
|
||||
Receive();
|
||||
g_profiler->graphAdd("client_received_packets", 1);
|
||||
}
|
||||
catch(con::NoIncomingDataException &e)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue