Blackfire profiler activation and usage

  • Get an account on https://blackfire.io/
  • Logon to the server as any application user trough SSH or SFTP and navigate to /etc/blackfire
  • Now enter the blackfire server credentials in the "agent" config file. You have to set the "server-id" and "server-token". You can find your credentials under your account setting at blackfire: 

  • Now reload blackfire to activate the new credentials , you can use the same regular application SSH user (you only have to do this once/server):

    # tscli blackfire reload
    +++ blackfire reload succeeded! +++

  • Once these steps are done, you can enable or disable the blackfire php extension at any time

    # tscli blackfire enable
    +++ blackfire enable at global level succeeded! +++

    Or disable:

    # tscli blackfire disabled
    +++ blackfire disable at global level succeeded! +++

    Note: These commands will restart php-fpm, so it will interupt php and the website for a very short period.

  • Now install the blackfire chrome extension: https://chrome.google.com/webstore/detail/blackfire-profiler/miefikpgahefdbcgoiicnmpbeeomffld
    or Firefox Extension: https://addons.mozilla.org/nl/firefox/addon/blackfire/
  • Once installed , surf the page you want to analyse and hit the blackfire "Profile" button. The "Profile all requests" button can also come in handy for more complex situations, it will record all website activity as long as it's enabled :)


Was this article helpful?

mood_bad Dislike 0
mood Like 3
visibility Views: 5674