aozhiwei b4204e577e 1
2023-11-20 17:19:03 +08:00

43 lines
886 B
C++

#include "precompile.h"
#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()
{
}
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 e_h:%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,
event_handler_num
});
}