LoginSignup
9
8

More than 5 years have passed since last update.

PHPプロファイラーのblackfireを使う

Last updated at Posted at 2016-08-14

PHPプロファイラーのblackfireを使う

blackfire

Sensio-Labs-blackfire_secondary_horizontal_transparent.png
Symfony の開発元である SensioLabs が開発するPHPプロファイラー。

名称未設定-1.png

PHPプロファイラー

blackfire

PHPフレームワークのSymfonyの開発元SensioLabsが開発している。
サーバーに監視プログラムをインストールするだけで、プログラム側に手を入れる必要はない。
Chrome エクステンションを使って確認する必要がある。

Xdebug

Xdebug は PHP のコア開発者である Derick Rethans 氏が開発している、PHP のデバッグ用エクステンション。1
yum install php-pecl-xdebug --enablerepo=epelで手軽にインストールできる
webgrind などで視覚化して確認する。

XHProf & XHGui

ソースコードに xhprof_enable() を記述する必要がある。
XHProf は開発元の Facebook がメンテしなくなったため uprofiler に Fork された。2

Zend Server Z-Ray

Zend Server 上でしか使えない。

Tideways aka Qafoo Profiler

各プロファイラーの比較

機能 blackfire Xdebug XHProf Z-Ray Tideway
無償利用 30日間
Extension Interface Available × × × × ×
Data Stored Locally × × × × ×
リクエストの比較 × ×
有向グラフ ×
Callers (Parent Calls) × × × × ×
Callees (Child Calls) × × × × ×
メモリー情報 ×
DBクエリの表示 × ×
PHPエラー&警告表示 × × ×
関数フィルター
非ブラウザリクエスト
Several Execution Times × × × × ×
機能 blackfire Xdebug XHProf Z-Ray Tideway

blackfireのインストール

$ sudo yum install pygpgme
$ wget -O - "http://packages.blackfire.io/fedora/blackfire.repo" | sudo tee /etc/yum.repos.d/blackfire.repo
$ sudo yum install blackfire-agent

https://blackfire.io/docs/up-and-running/installation
https://blackfire.io/account/credentials

$ blackfire-agent -register
$ sudo service blackfire-agent start
$ blackfire config
$ sudo yum install blackfire-php

Chromeエクステンションのインストール

9
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
8