Modified:
branches/bmas-staging/relay.php
Log:
Performance monitoring code.
Modified: branches/bmas-staging/relay.php
===================================================================
--- branches/bmas-staging/relay.php 2011-10-25 19:40:01 UTC (rev 6169)
+++ branches/bmas-staging/relay.php 2011-10-26 16:39:18 UTC (rev 6170)
@@ -22,6 +22,15 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Performance monitoring
+$GLOBALS['timer'] = microtime(true) * 1000000;
+function shutdown_function() {
+ $endtime = microtime(true) * 1000000;
+ apache_note("php_time", $endtime - $GLOBALS['timer']);
+ apache_note("php_mem", memory_get_peak_usage());
+}
+register_shutdown_function('shutdown_function');
+
// Handle public methods for initialization
if ( ! file_exists( dirname(__FILE__).'/data/cache/healthy' ) ) {
define( 'SKIP_SQL_INIT', true );