r6170 - branches/bmas-staging

2 views
Skip to first unread message

subve...@svn.freemedsoftware.org

unread,
Oct 26, 2011, 12:39:18 PM10/26/11
to freemed-d...@googlegroups.com
Author: jeff
Date: 2011-10-26 12:39:18 -0400 (Wed, 26 Oct 2011)
New Revision: 6170

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 );

Reply all
Reply to author
Forward
0 new messages