Created
May 22, 2012 21:30
-
-
Save pateketrueke/2771730 to your computer and use it in GitHub Desktop.
XHProf hook example
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 | |
call_user_func(function () { | |
register_shutdown_function(function () { | |
$data = xhprof_disable(); | |
$obj = new XHProfRuns_Default(); | |
$obj->save_run($data, 'MyApp'); | |
}); | |
require 'xhprof_lib/utils/xhprof_lib.php'; | |
require 'xhprof_lib/utils/xhprof_runs.php'; | |
xhprof_enable(XHPROF_FLAGS_NO_BUILTINS); | |
// ... | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment