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:
Sam Minnee 2008-10-17 00:52:58 +00:00
parent 6fe79bc1c6
commit c6f6f82f24

View File

@ -122,10 +122,14 @@ class Director {
$response->setBody($result); $response->setBody($result);
} }
// ?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(); $response->output();
}
//$controllerObj->getSession()->inst_save(); //$controllerObj->getSession()->inst_save();
} }
} }