Profiler クラス

The profiler class allows you to add your own profiling information to the profiler. It implements a customized version of PHPQuickProfiler (PQP).

Configure runtime behaviour

The profiler contains a collection of javascript global variables through which you can control the initial state of the profiler.

Example:

	<script type="text/javascript">
		var PQP_SHOWONLOAD = true;
		var PQP_HEIGHT = 'short';
		var PQP_DETAILS = true;
		var PQP_BOTTOM = true;
	</script>

Class methods

mark($label)

mark はスピードマーカーをプロファイラに追加します。 追加されたマーカーはプロファイラの "Load Time" セクションで確認することができます。

静的 はい
パラメータ
パラメータ デフォルト 説明
$label 必須 スピードマーカーの説明
返り値 void
Profiler::mark('これはメソッドの開始地点です');

mark_memory($var, $name)

mark_memoryはメモリマーカーをプロファイラに追加します。
変数を渡した場合、その変数のメモリ使用量が記録されます。 そうでない場合は、その時点でのメモリ使用量が記録されます。

静的 はい
パラメータ
パラメータ デフォルト 説明
$var false サイズを取得したい変数。もし、falseを渡すか、何も渡さない場合は全体のメモリ使用量が記録されます。
$name 'Memory Usage' マーカーの説明
返り値 void
Profiler::mark_memory($this, 'Controller_Welcome オブジェクトです');

console($text)

console メソッドはログをプロファイラに追加します。

静的 はい
パラメータ
パラメータ デフォルト 説明
$text 必須 プロファイラへ追加するログ
返り値 void
Profiler::console('start of this piece of code');