We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
The text was updated successfully, but these errors were encountered:
You could instead write a decorator implementing FixtureInterface, then decorate each fixture when gathering them?
FixtureInterface
Sorry, something went wrong.
good idea, will dig it. One thing this could have led to is having the total time spent as well (locally I use time bin/console (...)
time bin/console (...)
No branches or pull requests
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:
My issue here is that it's overlapping the bundle and the library and I don't see any easy hook to catch.
The text was updated successfully, but these errors were encountered: