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

时间:2011-03-03 12:57:03

标签: zend-framework

在页面底部显示当前请求占用的内存使用情况会很好。

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

任何建议将不胜感激:)

谢谢!

1 个答案:

答案 0 :(得分:5)

这些方面的东西......

在bootstrap中:

Zend_Registry::set('startTime', microtime());

布局:

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