Created
August 8, 2013 22:06
-
-
Save anonymous/6189234 to your computer and use it in GitHub Desktop.
Filthy addition to msonnabaum's quick and dirty method. For your install profiles.
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
| diff --git a/index.php b/index.php | |
| index 8b83199..bef9094 100644 | |
| --- a/index.php | |
| +++ b/index.php | |
| @@ -1,4 +1,10 @@ | |
| <?php | |
| +xhprof_enable(XHPROF_FLAGS_CPU + XHPROF_FLAGS_MEMORY); | |
| +register_shutdown_function(function() { | |
| + $xhprof_data = xhprof_disable(); | |
| + $filename = '/tmp/' . uniqid() . '.drupal.xhprof'; | |
| + file_put_contents($filename, serialize($xhprof_data)); | |
| +}); | |
| /** | |
| * @file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment