IcingaConfig: do not benchmark no objects of type

This commit is contained in:
Thomas Gelf 2016-05-13 14:20:31 +02:00
parent 8b6866ecc8
commit ac640fd113
1 changed files with 4 additions and 0 deletions

View File

@ -420,6 +420,10 @@ class IcingaConfig
protected function createFileForObjects($type, $objects)
{
if (empty($objects)) {
return $this;
}
Benchmark::measure(sprintf('Generating %ss: %s', $type, count($objects)));
foreach ($objects as $object) {
if ($object->isExternal()) {