This commit is contained in:
aozhiwei 2019-06-21 15:27:12 +08:00
parent a7a372bc9c
commit 11eee3ae95
4 changed files with 17 additions and 3 deletions

View File

@ -135,3 +135,13 @@ long long GGListener::GetSendNodeNum()
{ {
return tcp_listener_->send_node_num; return tcp_listener_->send_node_num;
} }
long long GGListener::GetSentNodeNum()
{
return tcp_listener_->sent_node_num;
}
long long GGListener::GetSentBytesNum()
{
return tcp_listener_->sent_bytes_num;
}

View File

@ -41,6 +41,8 @@ class GGListener : public a8::Singleton<GGListener>
void ForceCloseClient(int sockhandle); void ForceCloseClient(int sockhandle);
void MarkClient(int sockhandle, bool is_active); void MarkClient(int sockhandle, bool is_active);
long long GetSendNodeNum(); long long GetSendNodeNum();
long long GetSentNodeNum();
long long GetSentBytesNum();
private: private:
a8::TcpListener *tcp_listener_ = nullptr; a8::TcpListener *tcp_listener_ = nullptr;

View File

@ -61,7 +61,7 @@ static void SavePerfLog()
PlayerMgr::Instance()->OnlineNum() PlayerMgr::Instance()->OnlineNum()
}); });
if (App::Instance()->HasFlag(4)) { if (App::Instance()->HasFlag(4)) {
a8::XPrintf("mainloop_time:%d netmsg_time:%d room:%d over_room:%d online:%d bullet:%d grid_chg_times:%d test_times:%d ray_times:%d ray_time:%d send_node_num:%d\n", a8::XPrintf("mainloop_time:%d netmsg_time:%d room:%d over_room:%d online:%d bullet:%d grid_chg_times:%d test_times:%d ray_times:%d ray_time:%d send_node_num:%d sent_node_num:%d sent_bytes_num:%d\n",
{ {
App::Instance()->perf.max_run_delay_time, App::Instance()->perf.max_run_delay_time,
App::Instance()->perf.max_dispatchmsg_time, App::Instance()->perf.max_dispatchmsg_time,
@ -73,7 +73,9 @@ static void SavePerfLog()
App::Instance()->perf.test_times, App::Instance()->perf.test_times,
App::Instance()->perf.ray_times, App::Instance()->perf.ray_times,
App::Instance()->perf.ray_time, App::Instance()->perf.ray_time,
GGListener::Instance()->GetSendNodeNum() GGListener::Instance()->GetSendNodeNum(),
GGListener::Instance()->GetSentNodeNum(),
GGListener::Instance()->GetSentBytesNum()
}); });
a8::XPrintf("params[0]:%d params[1]:%d params[2]:%d params[3]:%d params[4]:%d params[5]:%d params[6]:%d\n", a8::XPrintf("params[0]:%d params[1]:%d params[2]:%d params[3]:%d params[4]:%d params[5]:%d params[6]:%d\n",
{ {

@ -1 +1 @@
Subproject commit c086156f8094a8ecce9faf5f30667d22e3918dc1 Subproject commit 379e4a5b83953e5ff3a0b89340c6bc0738ebc7ef