blackfire

Improve Composer\Autoload\includeFile in Symfony

喜夏-厌秋 提交于 2019-12-10 11:41:58
问题 I have made Blackfire test on my Symfony 2.8 project and it shows that most of the time (more than 50%) is used by 435 calls of Composer\Autoload\includeFile Any suggestions how to improve it? I am using php composer.phar dump-autoload --optimize after I clear cache for prod. I use APC for metadata and query cache for doctrine and my app.php file looks like this: <?php use Symfony\Component\HttpFoundation\Request; /** * @var Composer\Autoload\ClassLoader */ $loader = require __DIR__.'/../app

How to profile a PHP shell script app or worker using Blackfire

情到浓时终转凉″ 提交于 2019-12-07 17:26:26
问题 I noticed that when I have an endless worker I cannot profile PHP shell scripts. Because when it's killed it doesn't send the probe. What changes shall I do? 回答1: When you are trying to profile a worker which is running an endless loop. In this case you have to manually edit your code to either remove the endless loop or instrument your code to manually call the close() method of the probe (https://blackfire.io/doc/manual-instrumentation). That's because the data is sent to the agent only