プロファイリング

FuelPHP に同梱のアプリケーションプロファイラは、PHP Quick Profiler をベースにしています。

プロファイリングとは?

プロファイラは、多くの余計なコードを追加することなく、プロファイリングとデバッグに関係する情報を提供します。 あなたは設定を true に切り替えて、an automated tool to help create a faster and more consistent review experience にアクセスするだけです。 Since anyone can use it, the profiler also gives you an idea of where the code stands before the review.

プロファイラは、タブ化されたインターフェイスを提供し、これにより以下の情報を見つけられます:

典型的なプロファイラの画面はこんな感じです:

プロファイラの画面の最下部に、次の3つのオプションがあります:

アプリケーションのプロファイリング

デフォルトでは、アプリケーションのプロファイリングは無効になっています。アプリケーションの config/config.php ファイルで、プロファイラを有効化できます。

'profiling'  => true,

プロファイラが有効化されると、ブラウザの画面の最下部にポップアップで表示されます。

データベースのプロファイリング

Database profiling is disabled by default too. Database profiling is activated per defined database, and is activated by setting the 'profiling' option of the database configuration you want to profile in your config/<environment>/db.php to true.

'profiling'  => true,

複数の環境を使用している場合、設定する db.php ファイルが正しいか確認してください。

プロファイラに情報を追加する

どのようにしてプロファイラとやり取りするかは、Profiler クラスのドキュメントを参照してください。