mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
IcingaConfig: do not benchmark no objects of type
This commit is contained in:
parent
8b6866ecc8
commit
ac640fd113
@ -420,6 +420,10 @@ class IcingaConfig
|
|||||||
|
|
||||||
protected function createFileForObjects($type, $objects)
|
protected function createFileForObjects($type, $objects)
|
||||||
{
|
{
|
||||||
|
if (empty($objects)) {
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
Benchmark::measure(sprintf('Generating %ss: %s', $type, count($objects)));
|
Benchmark::measure(sprintf('Generating %ss: %s', $type, count($objects)));
|
||||||
foreach ($objects as $object) {
|
foreach ($objects as $object) {
|
||||||
if ($object->isExternal()) {
|
if ($object->isExternal()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user