mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Correct erroneous reported max lag with prometheus (#10427)
Co-authored-by: BuckarooBanzay <BuckarooBanzay@users.noreply.github.com>
This commit is contained in:
parent
9bff154cba
commit
c6e3050357
1 changed files with 6 additions and 1 deletions
|
@ -653,7 +653,12 @@ void Server::AsyncRunStep(bool initial_step)
|
||||||
}
|
}
|
||||||
m_clients.step(dtime);
|
m_clients.step(dtime);
|
||||||
|
|
||||||
m_lag_gauge->increment((m_lag_gauge->get() > dtime ? -1 : 1) * dtime/100);
|
// increase/decrease lag gauge gradually
|
||||||
|
if (m_lag_gauge->get() > dtime) {
|
||||||
|
m_lag_gauge->decrement(dtime/100);
|
||||||
|
} else {
|
||||||
|
m_lag_gauge->increment(dtime/100);
|
||||||
|
}
|
||||||
#if USE_CURL
|
#if USE_CURL
|
||||||
// send masterserver announce
|
// send masterserver announce
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue