1
This commit is contained in:
parent
dc613359c9
commit
0c8a248450
@ -2,6 +2,8 @@
|
||||
|
||||
#include "framework/cpp/netmsghandler.h"
|
||||
|
||||
#include "perfmonitor.h"
|
||||
|
||||
//gate listener
|
||||
namespace a8
|
||||
{
|
||||
@ -31,6 +33,7 @@ class WSListener : public a8::Singleton<WSListener>
|
||||
{
|
||||
static int msgid = f8::Net_GetMessageId(msg);
|
||||
f8::Net_SendProxyMsg(tcp_listener_, sockhandle, 0, 0, msgid, msg);
|
||||
++PerfMonitor::Instance()->send_ws_count;
|
||||
#ifdef DEBUG
|
||||
f8::DumpMsgToLog(msg, "<<<<<<<WSL ");
|
||||
#endif
|
||||
@ -41,6 +44,7 @@ class WSListener : public a8::Singleton<WSListener>
|
||||
{
|
||||
static int msgid = f8::Net_GetMessageId(msg);
|
||||
f8::Net_SendProxyMsg(tcp_listener_, sockhandle, seqid, 0, msgid, msg);
|
||||
++PerfMonitor::Instance()->send_ws_count;
|
||||
#ifdef DEBUG
|
||||
f8::DumpMsgToLog(msg, "<<<<<<<WSL ");
|
||||
#endif
|
||||
|
@ -13,7 +13,8 @@ static void SavePerfLog()
|
||||
a8::UdpLog::Instance()->Info
|
||||
("max_run_delay_time:%d max_timer_idle:%d "
|
||||
"in_data_size:%d out_data_size:%d msgnode_size:%d read_count:%d max_login_time:%d "
|
||||
"login_ok_time:%d login_error_time:%d online_num:%d watch_num:%d cache_users_num:%d ",
|
||||
"login_ok_time:%d login_error_time:%d online_num:%d watch_num:%d cache_users_num:%d "
|
||||
"send_ws_count:%d ",
|
||||
{
|
||||
PerfMonitor::Instance()->max_run_delay_time,
|
||||
PerfMonitor::Instance()->max_timer_idle,
|
||||
@ -26,7 +27,8 @@ static void SavePerfLog()
|
||||
PerfMonitor::Instance()->login_error_times,
|
||||
PlayerMgr::Instance()->OnlineNum(),
|
||||
PlayerMgr::Instance()->WatchPlayerNum(),
|
||||
DBHelper::Instance()->cache_users_hash.size()
|
||||
DBHelper::Instance()->cache_users_hash.size(),
|
||||
PerfMonitor::Instance()->send_ws_count
|
||||
});
|
||||
a8::UdpLog::Instance()->Info
|
||||
("run_times:%d timer_times:%d event_times:%d free_times:%d "
|
||||
|
@ -16,6 +16,7 @@ class PerfMonitor : public a8::Singleton<PerfMonitor>
|
||||
long long out_data_size = 0;
|
||||
long long in_data_size = 0;
|
||||
long long read_count = 0;
|
||||
long long send_ws_count = 0;
|
||||
|
||||
void Init();
|
||||
void UnInit();
|
||||
|
Loading…
x
Reference in New Issue
Block a user