zend框架应用程序内存使用和渲染时间问题

Sta*_*ann 4 zend-framework

在页面底部显示当前请求占用的内存是很好的.

我将如何通过zend app测量内存使用量?还有 - 有办法测量渲染时间吗?

任何建议将不胜感激:)

谢谢!

Tom*_*far 5

沿着这些方向......

在引导程序中:

Zend_Registry::set('startTime', microtime());
Run Code Online (Sandbox Code Playgroud)

在布局中:

$timeMs = microtime() - Zend_Registry::get('startTime');
$memory = memory_get_peak_usage();
echo sprintf("Eaten %s memory in %s", $memory, $timeMs);
Run Code Online (Sandbox Code Playgroud)