mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 13:45:04 +02:00
Ensure that execution_time never goes below 0
This commit is contained in:
parent
4e43c766ca
commit
91ecfc35cf
@ -1616,7 +1616,7 @@ Dictionary::Ptr IcingaDB::SerializeState(const Checkable::Ptr& checkable)
|
|||||||
|
|
||||||
if (!cr->GetCommand().IsEmpty())
|
if (!cr->GetCommand().IsEmpty())
|
||||||
attrs->Set("commandline", FormatCommandLine(cr->GetCommand()));
|
attrs->Set("commandline", FormatCommandLine(cr->GetCommand()));
|
||||||
attrs->Set("execution_time", TimestampToMilliseconds(cr->CalculateExecutionTime()));
|
attrs->Set("execution_time", TimestampToMilliseconds(fmax(0.0, cr->CalculateExecutionTime())));
|
||||||
attrs->Set("latency", TimestampToMilliseconds(cr->CalculateLatency()));
|
attrs->Set("latency", TimestampToMilliseconds(cr->CalculateLatency()));
|
||||||
attrs->Set("check_source", cr->GetCheckSource());
|
attrs->Set("check_source", cr->GetCheckSource());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user