mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Log server map send cycle time. (#13259)
* Measure server map send time per player.
This commit is contained in:
parent
915befecc5
commit
dcf6a6a67b
4 changed files with 874 additions and 0 deletions
|
@ -99,6 +99,7 @@ void RemoteClient::GetNextBlocks (
|
|||
{
|
||||
// Increment timers
|
||||
m_nothing_to_send_pause_timer -= dtime;
|
||||
m_map_send_completion_timer += dtime;
|
||||
|
||||
if (m_nothing_to_send_pause_timer >= 0)
|
||||
return;
|
||||
|
@ -384,6 +385,8 @@ queue_full_break:
|
|||
if (d > full_d_max) {
|
||||
new_nearest_unsent_d = 0;
|
||||
m_nothing_to_send_pause_timer = 2.0f;
|
||||
infostream << "Server: Player " << m_name << ", RemoteClient " << peer_id << ": full map send completed after " << m_map_send_completion_timer << "s, restarting" << std::endl;
|
||||
m_map_send_completion_timer = 0.0f;
|
||||
} else {
|
||||
if (nearest_sent_d != -1)
|
||||
new_nearest_unsent_d = nearest_sent_d;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue