-
-
Notifications
You must be signed in to change notification settings - Fork 211
Open
Description
Hi, I did a local trick to try and optimize our fixtures performance, it's pretty nice to see where you fixture time is going.
The trick is as simple as it gets, but I wonder how I could enable this only in verbose mode:
//src/Executor/ORMExecutor.php
public function execute(array $fixtures, $append = false)
{
$executor = $this;
$this->em->wrapInTransaction(static function (EntityManagerInterface $em) use ($executor, $fixtures, $append) {
if ($append === false) {
$executor->purge();
}
foreach ($fixtures as $fixture) {
$start = microtime(true);
$executor->load($em, $fixture);
$end = microtime(true);
$executionTime = $end - $start;
echo 'Execution Time: ' . $executionTime . PHP_EOL;
}
});
}
My issue here is that it's overlapping the bundle and the library and I don't see any easy hook to catch.
Metadata
Metadata
Assignees
Labels
No labels