Blackfire

Blackfire

Blackfire.io is a PHP profiler and automated performance testing tool that can be used in the development, Integration, Staging, and Production environments.

It provides details information on your PHP code’s resources consumption across Wall-Time, CPU, I/O, Memory, Network Calls, HTTP requests and SQL queries.

In addition, it can profile your code automatically and notify you whenever your code does not comply with best practices for PHP, Symfony, Drupal, eZPlatform, Typo3 & Magento code performance management.

Blackfire is installed by default on SymfonyCloud and can be enabled at any time:

1
2
3
4
# .symfony.cloud.yaml
runtime:
    extensions:
        - blackfire

Commit and deploy the changes to enable Blackfire:

1
2
3
$ git add .symfony.cloud.yaml
$ git commit -m "Enable Blackfire."
$ symfony deploy

Next, go to your Blackfire Dashboard, create a new environment under the Environments tab and specify your credentials:

1
$ symfony var:set BLACKFIRE_SERVER_ID=<insert your Server ID> BLACKFIRE_SERVER_TOKEN=<Insert your Server Token>

Going further with Blackfire

Blackfire can also leverage SymfonyCloud’s webhook to enable automatic profiling and performance testing each time you deploy new code. Check their documentation for more information.

This work, including the code samples, is licensed under a Creative Commons BY-SA 3.0 license.