mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-02 14:18:46 +02:00
FEATURE: Added ?debug_memory=1 flag
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64473 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
6fe79bc1c6
commit
c6f6f82f24
@ -121,11 +121,15 @@ class Director {
|
||||
$response = new HTTPResponse();
|
||||
$response->setBody($result);
|
||||
}
|
||||
|
||||
$response->output();
|
||||
|
||||
// ?debug_memory=1 will output the number of bytes of memory used for this request
|
||||
if(isset($_REQUEST['debug_memory']) && $_REQUEST['debug_memory']) {
|
||||
echo number_format(memory_get_peak_usage(),0);
|
||||
} else {
|
||||
$response->output();
|
||||
}
|
||||
|
||||
//$controllerObj->getSession()->inst_save();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user