mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2024-08-27 17:52:21 +02:00
Don't update CPU statistics before returning it to avoid synchronous open of "/proc/stat".
This commit is contained in:
parent
4e8ba65838
commit
1ec733a3f8
@ -230,7 +230,6 @@ void ClientManager::get_stats(td::Promise<td::BufferSlice> promise,
|
||||
LOG(INFO) << "Failed to get memory statistics: " << r_mem_stat.error();
|
||||
}
|
||||
|
||||
ServerCpuStat::update(td::Time::now());
|
||||
auto cpu_stats = ServerCpuStat::instance().as_vector(td::Time::now());
|
||||
for (auto &stat : cpu_stats) {
|
||||
sb << stat.key_ << "\t" << stat.value_ << '\n';
|
||||
|
Loading…
Reference in New Issue
Block a user