添加日志

This commit is contained in:
aozhiwei 2020-07-10 11:00:02 +08:00
parent 0c8a248450
commit e256b557b4
2 changed files with 8 additions and 3 deletions

View File

@ -8,13 +8,15 @@
#include "playermgr.h" #include "playermgr.h"
#include "dbhelper.h" #include "dbhelper.h"
#include "framework/cpp/dbpool.h"
static void SavePerfLog() static void SavePerfLog()
{ {
a8::UdpLog::Instance()->Info a8::UdpLog::Instance()->Info
("max_run_delay_time:%d max_timer_idle:%d " ("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 " "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 ", "send_ws_count:%d db.total_query_num:%d db.exec_query_num:%d db.run_loop_num:%d ",
{ {
PerfMonitor::Instance()->max_run_delay_time, PerfMonitor::Instance()->max_run_delay_time,
PerfMonitor::Instance()->max_timer_idle, PerfMonitor::Instance()->max_timer_idle,
@ -28,7 +30,10 @@ static void SavePerfLog()
PlayerMgr::Instance()->OnlineNum(), PlayerMgr::Instance()->OnlineNum(),
PlayerMgr::Instance()->WatchPlayerNum(), PlayerMgr::Instance()->WatchPlayerNum(),
DBHelper::Instance()->cache_users_hash.size(), DBHelper::Instance()->cache_users_hash.size(),
PerfMonitor::Instance()->send_ws_count PerfMonitor::Instance()->send_ws_count,
(long long)f8::DBPool::Instance()->total_query_num,
(long long)f8::DBPool::Instance()->exec_query_num,
(long long)f8::DBPool::Instance()->run_loop_num
}); });
a8::UdpLog::Instance()->Info a8::UdpLog::Instance()->Info
("run_times:%d timer_times:%d event_times:%d free_times:%d " ("run_times:%d timer_times:%d event_times:%d free_times:%d "

@ -1 +1 @@
Subproject commit 6e1e84260c42c24a58fe98e25ea6ccd18331248d Subproject commit 8268f46febd430357e19c41271219ead8fbdcccc