aboutsummaryrefslogtreecommitdiff
path: root/src/clientiface.cpp
diff options
context:
space:
mode:
authorlhofhansl <larsh@apache.org>2023-03-03 17:41:30 -0800
committerGitHub <noreply@github.com>2023-03-03 17:41:30 -0800
commitdcf6a6a67b0c95d27093c29a3be734a17586af23 (patch)
treee7e1c02e309b2456b1968eac37afd89afb7f4c64 /src/clientiface.cpp
parent915befecc5dc6d48a2c0ef985eba0c6192361494 (diff)
downloadminetest-dcf6a6a67b0c95d27093c29a3be734a17586af23.tar.xz
Log server map send cycle time. (#13259)
* Measure server map send time per player.
Diffstat (limited to 'src/clientiface.cpp')
-rw-r--r--src/clientiface.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/clientiface.cpp b/src/clientiface.cpp
index 9d1a6cd03..bb25a4265 100644
--- a/src/clientiface.cpp
+++ b/src/clientiface.cpp
@@ -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;