隔离mastrserver game2001api
This commit is contained in:
parent
30a76daeb7
commit
6c5885a016
@ -53,15 +53,15 @@ const char* const PROJ_LOG_FILENAME_FMT = "log_$pid_%Y%m%d.log";
|
||||
|
||||
static void SavePerfLog()
|
||||
{
|
||||
a8::UdpLog::Instance()->Info("max_mainloop_rundelay:%d room_num:%d player_num:%d online_num:%d max_http_time:%d "
|
||||
"max_request_delay:%d http_pending_num:%d",
|
||||
a8::UdpLog::Instance()->Info("max_mainloop_rundelay:%d room_num:%d player_num:%d online_num:%d "
|
||||
"max_sys_request_delay:%d max_user_request_delay:%d http_pending_num:%d",
|
||||
{
|
||||
App::Instance()->perf.max_run_delay_time,
|
||||
RoomMgr::Instance()->RoomNum(),
|
||||
App::Instance()->perf.entity_num[ET_Player],
|
||||
PlayerMgr::Instance()->OnlineNum(),
|
||||
App::Instance()->perf.max_http_time,
|
||||
f8::HttpClientPool::Instance()->max_request_delay,
|
||||
f8::HttpClientPool::Instance()->max_sys_request_delay,
|
||||
f8::HttpClientPool::Instance()->max_user_request_delay,
|
||||
f8::HttpClientPool::Instance()->GetPendingNum()
|
||||
});
|
||||
if (App::Instance()->HasFlag(4)) {
|
||||
@ -106,8 +106,8 @@ static void SavePerfLog()
|
||||
App::Instance()->perf.params[4] = 0,
|
||||
App::Instance()->perf.params[5] = 0,
|
||||
App::Instance()->perf.params[6] = 0,
|
||||
App::Instance()->perf.max_http_time = 0;
|
||||
f8::HttpClientPool::Instance()->max_request_delay = 0;
|
||||
f8::HttpClientPool::Instance()->max_sys_request_delay = 0;
|
||||
f8::HttpClientPool::Instance()->max_user_request_delay = 0;
|
||||
}
|
||||
|
||||
bool App::Init(int argc, char* argv[])
|
||||
@ -147,7 +147,7 @@ bool App::Init(int argc, char* argv[])
|
||||
a8::Timer::Instance()->Init();
|
||||
f8::MsgQueue::Instance()->Init();
|
||||
f8::TGLog::Instance()->Init(a8::Format(PROJ_NAME_FMT, {GAME_ID}), false);
|
||||
f8::HttpClientPool::Instance()->Init(10);
|
||||
f8::HttpClientPool::Instance()->Init(MAX_ALL_HTTP_NUM, MAX_SYS_HTTP_NUM, MAX_USER_HTTP_NUM);
|
||||
JsonDataMgr::Instance()->Init();
|
||||
MetaMgr::Instance()->Init();
|
||||
uuid.SetMachineId((node_id - 1) * MAX_NODE_ID + instance_id);
|
||||
|
@ -199,3 +199,7 @@ const int MAX_INSTANCE_ID = 500;
|
||||
const int WALK_ZONE_WIDTH = 100;
|
||||
|
||||
const int MAX_TEAM_NUM = 4;
|
||||
|
||||
const int MAX_SYS_HTTP_NUM = 2;
|
||||
const int MAX_USER_HTTP_NUM = 8;
|
||||
const int MAX_ALL_HTTP_NUM = MAX_SYS_HTTP_NUM + MAX_USER_HTTP_NUM;
|
||||
|
@ -2066,7 +2066,7 @@ void Human::InternalSendGameOver()
|
||||
on_error,
|
||||
url.c_str(),
|
||||
*params,
|
||||
room->room_uuid
|
||||
MAX_SYS_HTTP_NUM + (room->room_uuid % MAX_USER_HTTP_NUM)
|
||||
);
|
||||
delete params;
|
||||
sending_gameover_ = true;
|
||||
|
@ -190,7 +190,7 @@ void RoomMgr::ReportServerState(int instance_id, const std::string& host, int po
|
||||
on_error,
|
||||
url.c_str(),
|
||||
*url_params,
|
||||
rand()
|
||||
rand() % MAX_SYS_HTTP_NUM
|
||||
);
|
||||
delete url_params;
|
||||
}
|
||||
|
@ -12,7 +12,6 @@ struct PerfMonitor
|
||||
long long test_times = 0;
|
||||
long long ray_times = 0;
|
||||
long long ray_time = 0;
|
||||
long long max_http_time = 0;
|
||||
std::array<long long, 30> params = {};
|
||||
std::array<int, 30> entity_num = {};
|
||||
};
|
||||
|
2
third_party/framework
vendored
2
third_party/framework
vendored
@ -1 +1 @@
|
||||
Subproject commit 21332b63ad3066027c004aae21cfb277283bf985
|
||||
Subproject commit c71e7fb8b5a5d08727c3d71552d53285f99dd328
|
Loading…
x
Reference in New Issue
Block a user