diff --git a/server/gameserver/GGListener.h b/server/gameserver/GGListener.h index 5a29f50..c26b5ed 100644 --- a/server/gameserver/GGListener.h +++ b/server/gameserver/GGListener.h @@ -20,6 +20,7 @@ public: void UnInit(); int max_packet_size = 0; + int his_max_packet_size = 0; template void SendProxyMsg(int sockhandle, T& msg) diff --git a/server/gameserver/app.cc b/server/gameserver/app.cc index d5e1854..bf46871 100644 --- a/server/gameserver/app.cc +++ b/server/gameserver/app.cc @@ -65,8 +65,9 @@ static void SavePerfLog() a8::UdpLog::Instance()->Info ("max_rundelay:%d room_num:%d player_num:%d online_num:%d alive_count:%d " "sys_request_delay:%d user_request_delay:%d http_pending_num:%d real_alive_count:%d " - "account_num:%d level0_num:%d level1_num:%d max_full_obj:%d max_part_obj:%d max_bullet:%d " - "max_packet:%d", + "account_num:%d level0_num:%d level1_num:%d " + "max_full_obj:%d max_part_obj:%d max_bullet:%d max_packet:%d" + "his_max_full_obj:%d his_max_part_obj:%d his_max_bullet:%d his_max_packet:%d", { PerfMonitor::Instance()->max_run_delay_time, RoomMgr::Instance()->RoomNum(), @@ -83,8 +84,22 @@ static void SavePerfLog() PerfMonitor::Instance()->max_full_objects_num, PerfMonitor::Instance()->max_part_objects_num, PerfMonitor::Instance()->max_bullet_num, - GGListener::Instance()->max_packet_size + GGListener::Instance()->max_packet_size, + PerfMonitor::Instance()->his_max_full_objects_num, + PerfMonitor::Instance()->his_max_part_objects_num, + PerfMonitor::Instance()->his_max_bullet_num, + GGListener::Instance()->his_max_packet_size }); + { + PerfMonitor::Instance()->his_max_full_objects_num = std::max + (PerfMonitor::Instance()->his_max_full_objects_num, PerfMonitor::Instance()->max_full_objects_num); + PerfMonitor::Instance()->his_max_part_objects_num = std::max + (PerfMonitor::Instance()->his_max_part_objects_num, PerfMonitor::Instance()->max_part_objects_num); + PerfMonitor::Instance()->his_max_bullet_num = std::max + (PerfMonitor::Instance()->his_max_bullet_num, PerfMonitor::Instance()->max_bullet_num); + GGListener::Instance()->his_max_packet_size = std::max + (GGListener::Instance()->his_max_packet_size, GGListener::Instance()->max_packet_size); + } PerfMonitor::Instance()->max_run_delay_time = 0; PerfMonitor::Instance()->max_dispatchmsg_time = 0; PerfMonitor::Instance()->max_timer_idle = 0; diff --git a/server/gameserver/perfmonitor.h b/server/gameserver/perfmonitor.h index 1068faf..b3f7287 100644 --- a/server/gameserver/perfmonitor.h +++ b/server/gameserver/perfmonitor.h @@ -24,6 +24,10 @@ class PerfMonitor : public a8::Singleton int max_part_objects_num = 0; int max_bullet_num = 0; + int his_max_full_objects_num = 0; + int his_max_part_objects_num = 0; + int his_max_bullet_num = 0; + void Init(); void UnInit(); };