mirror of https://github.com/Icinga/icinga2.git
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())
|
||||
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("check_source", cr->GetCheckSource());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue