1
This commit is contained in:
parent
b86f97f44f
commit
454e244e0f
@ -163,11 +163,11 @@ bool App::Init(int argc, char* argv[])
|
||||
#ifdef DEBUG
|
||||
TraceMgr::Instance()->Init("gameserver2006");
|
||||
#endif
|
||||
Perf::Instance()->Init();
|
||||
PerfMonitor::Instance()->Init();
|
||||
f8::MsgQueue::Instance()->Init();
|
||||
HandlerMgr::Instance()->Init();
|
||||
f8::Timer::Instance()->Init();
|
||||
Perf::Instance()->Init();
|
||||
f8::TGLog::Instance()->Init(a8::Format(PROJ_NAME_FMT, {GAME_ID}), false, 0);
|
||||
f8::HttpClientPool::Instance()->Init(MAX_ALL_HTTP_NUM, MAX_SYS_HTTP_NUM, MAX_USER_HTTP_NUM);
|
||||
f8::BtMgr::Instance()->Init("exported");
|
||||
|
@ -2,9 +2,19 @@
|
||||
|
||||
#include "perf.h"
|
||||
|
||||
#include <f8/timer.h>
|
||||
#include <f8/udplog.h>
|
||||
|
||||
void Perf::Init()
|
||||
{
|
||||
|
||||
f8::Timer::Instance()->SetInterval
|
||||
(1000 *5,
|
||||
[this] (int event, const a8::Args* args)
|
||||
{
|
||||
if (a8::TIMER_EXEC_EVENT == event) {
|
||||
Output();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void Perf::UnInit()
|
||||
@ -14,5 +24,18 @@ void Perf::UnInit()
|
||||
|
||||
void Perf::Output()
|
||||
{
|
||||
|
||||
f8::UdpLog::Instance()->Info
|
||||
("perf entity:%d buff:%d bt_co:%d agent:%d c_w_c:%d c_w:%d o_w_c:%d o_w:%d e_w_c:%d e_c:%d",
|
||||
{
|
||||
entity_num,
|
||||
buff_num,
|
||||
bt_co_num,
|
||||
agent_num,
|
||||
c_wptr_chunk_num,
|
||||
c_wptr_num,
|
||||
o_wptr_chunk_num,
|
||||
o_wptr_num,
|
||||
e_wptr_chunk_num,
|
||||
e_wptr_num
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user