支持线程内存malloc统计 (#1317)

This commit is contained in:
夏楚
2021-12-27 17:40:15 +08:00
committed by GitHub
parent 7f649b94e5
commit 878ce87329
5 changed files with 132 additions and 55 deletions

View File

@@ -202,12 +202,12 @@ static void reportServerKeepalive() {
GET_CONFIG(float, alive_interval, Hook::kAliveInterval);
g_keepalive_timer = std::make_shared<Timer>(alive_interval, []() {
ArgsType body;
body["data"] = getStatisticJson();
//执行hook
do_http_hook(hook_server_keepalive, body, nullptr);
getStatisticJson([](const Value &data) mutable {
ArgsType body;
body["data"] = data;
//执行hook
do_http_hook(hook_server_keepalive, body, nullptr);
});
return true;
}, nullptr);
}