Created
August 6, 2014 12:36
-
-
Save Anye/2e93503967e361fa114d to your computer and use it in GitHub Desktop.
使用 xhprof
This file contains hidden or 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_FLAGS_CPU+XHPROF_FLAGS_MEMORY); | |
register_shutdown_function(function() { | |
$xhprof_data = xhprof_disable(); | |
include_once __DIR__ . '/xhprof/xhprof_lib/utils/xhprof_lib.php'; | |
include_once __DIR__ . '/xhprof/xhprof_lib/utils/xhprof_runs.php'; | |
$xhprof_runs = new XHProfRuns_Default(); | |
$run_id = $xhprof_runs->save_run($xhprof_data, "ce"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment