1
This commit is contained in:
parent
e853c444f0
commit
c85ebeca42
@ -27,6 +27,7 @@
|
||||
#include "killmgr.h"
|
||||
#include "httpproxy.h"
|
||||
#include "lispenv.h"
|
||||
#include "perf.h"
|
||||
|
||||
#include "ss_msgid.pb.h"
|
||||
#include "ss_proto.pb.h"
|
||||
@ -160,6 +161,7 @@ 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();
|
||||
@ -240,6 +242,7 @@ void App::UnInit()
|
||||
f8::MsgQueue::Instance()->UnInit();
|
||||
f8::Timer::Instance()->UnInit();
|
||||
PerfMonitor::Instance()->UnInit();
|
||||
Perf::Instance()->UnInit();
|
||||
f8::TGLog::Instance()->UnInit();
|
||||
#ifdef DEBUG
|
||||
TraceMgr::Instance()->UnInit();
|
||||
|
18
server/gameserver/perf.cc
Normal file
18
server/gameserver/perf.cc
Normal file
@ -0,0 +1,18 @@
|
||||
#include "precompile.h"
|
||||
|
||||
#include "perf.h"
|
||||
|
||||
void Perf::Init()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Perf::UnInit()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Perf::Output()
|
||||
{
|
||||
|
||||
}
|
25
server/gameserver/perf.h
Normal file
25
server/gameserver/perf.h
Normal file
@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
#define PERF 1
|
||||
|
||||
#include <a8/singleton.h>
|
||||
|
||||
class Perf : public a8::Singleton<Perf>
|
||||
{
|
||||
private:
|
||||
Perf() {};
|
||||
friend class a8::Singleton<Perf>;
|
||||
public:
|
||||
void Init();
|
||||
void UnInit();
|
||||
|
||||
long long entity_num = 0;
|
||||
long long buff_num = 0;
|
||||
long long bt_co_num = 0;
|
||||
long long agent_num = 0;
|
||||
long long frame_call_num = 0;
|
||||
|
||||
private:
|
||||
void Output();
|
||||
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user