Created
December 12, 2013 08:37
-
-
Save miukoba/7924900 to your computer and use it in GitHub Desktop.
xhprof の設定
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// フロントコントローラとかに仕込む | |
xhprof_enable(); | |
// 処理 | |
$xhprof_data = xhprof_disable(); | |
$XHPROF_ROOT = '/var/www/xhprof'; | |
$XHPROF_SOURCE_NAME = 'symfony'; | |
include_once $XHPROF_ROOT . '/xhprof_lib/utils/xhprof_lib.php'; | |
include_once $XHPROF_ROOT . '/xhprof_lib/utils/xhprof_runs.php'; | |
$xhprof_runs = new XHProfRuns_Default(); | |
$run_id = $xhprof_runs->save_run($xhprof_data, $XHPROF_SOURCE_NAME); | |
// echo "\n\n-----------------\n<a href='http://mydomain.com/xhprof/xhprof_html/index.php?run=$run_id&source=$XHPROF_SOURCE_NAME' target='_blank'>xhprof Result</a>\n-----------------\n"; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment