Import: distinct fetch from store in benchmark

This commit is contained in:
Thomas Gelf 2020-01-10 12:36:13 +01:00
parent 2ef30f5f12
commit f0b96674c9

View File

@ -3,6 +3,7 @@
namespace Icinga\Module\Director\Import; namespace Icinga\Module\Director\Import;
use Exception; use Exception;
use Icinga\Application\Benchmark;
use Icinga\Exception\IcingaException; use Icinga\Exception\IcingaException;
use Icinga\Module\Director\Db; use Icinga\Module\Director\Db;
use Icinga\Module\Director\Hook\ImportSourceHook; use Icinga\Module\Director\Hook\ImportSourceHook;
@ -164,7 +165,9 @@ class Import
$this->data = ImportSourceHook::forImportSource( $this->data = ImportSourceHook::forImportSource(
$this->source $this->source
)->fetchData(); )->fetchData();
Benchmark::measure('Fetched all data from Import Source');
$this->source->applyModifiers($this->data); $this->source->applyModifiers($this->data);
Benchmark::measure('Applied Property Modifiers to imported data');
} }
return $this->data; return $this->data;