This commit is contained in:
aozhiwei 2020-04-26 11:22:45 +08:00
parent 344df010a6
commit 3a30aed243
2 changed files with 28 additions and 4 deletions

View File

@ -67,6 +67,24 @@ static void SavePerfLog()
App::Instance()->perf.max_login_time, App::Instance()->perf.max_login_time,
App::Instance()->perf.max_join_time, App::Instance()->perf.max_join_time,
}); });
#if ASYNC_TCPCLIENT && GAME_ID == 2002
a8::UdpLog::Instance()->Info(" run_times:%d timer_times:%d event_times:%d free_times:%d "
" shutdown_times:%d connect_times:%d close_times:%d "
" send_times:%d recv_times:%d error_times:%d immsg_times:%d",
{
(long long)a8::IoLoop::Instance()->run_times,
(long long)a8::IoLoop::Instance()->timer_times,
(long long)a8::IoLoop::Instance()->event_times,
(long long)a8::IoLoop::Instance()->free_times,
(long long)a8::IoLoop::Instance()->shutdown_times,
(long long)a8::IoLoop::Instance()->connect_times,
(long long)a8::IoLoop::Instance()->close_times,
(long long)a8::IoLoop::Instance()->send_times,
(long long)a8::IoLoop::Instance()->recv_times,
(long long)a8::IoLoop::Instance()->error_times,
(long long)a8::IoLoop::Instance()->immsg_times
});
#endif
if (App::Instance()->HasFlag(2)) { if (App::Instance()->HasFlag(2)) {
a8::XPrintf("mainloop_time:%d netmsg_time:%d send_node_num:%d sent_bytes_num:%d\n", a8::XPrintf("mainloop_time:%d netmsg_time:%d send_node_num:%d sent_bytes_num:%d\n",
{ {
@ -109,12 +127,13 @@ bool App::Init(int argc, char* argv[])
#endif #endif
return false; return false;
} }
a8::XPrintf("wsproxy starting node_id:%d instance_id:%d pid:%d master_mode:%d\n", a8::XPrintf("wsproxy starting node_id:%d instance_id:%d pid:%d master_mode:%d async_tcpclient:%d\n",
{ {
node_id, node_id,
instance_id, instance_id,
getpid(), getpid(),
MASTER_MODE MASTER_MODE,
ASYNC_TCPCLIENT
}); });
loop_mutex_ = new std::mutex(); loop_mutex_ = new std::mutex();
@ -140,7 +159,12 @@ bool App::Init(int argc, char* argv[])
TargetConnMgr::Instance()->Init(); TargetConnMgr::Instance()->Init();
GCListener::Instance()->Init(); GCListener::Instance()->Init();
a8::UdpLog::Instance()->Info("wsproxy starting instance_id:%d pid:%d", {instance_id, getpid()}); a8::UdpLog::Instance()->Info("wsproxy starting instance_id:%d pid:%d async_tcpclient:%d",
{
instance_id,
getpid(),
ASYNC_TCPCLIENT
});
{ {
int perf_log_time = 1000 * 60 * 5; int perf_log_time = 1000 * 60 * 5;
if (getenv("is_dev_env")) { if (getenv("is_dev_env")) {

@ -1 +1 @@
Subproject commit 6770f48291d2eefd47d83699e6f7e326697a5843 Subproject commit a369c484113b240f042c62cba80afd26df91e4ca