mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +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
@ -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();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user