From: Dan F. <dfr...@wi...> - 2005-01-28 16:49:19
|
Reini, I saw you applied this in a nicer way than suggested in the patch. Thanks. I saw your request for me to do it. I would have to have a CVS mainline going and a reasonable confidence that what I checked in was cross-platform safe. Especially the second I wasn't sure about. Dan SourceForge.net wrote: >Patches item #1094143, was opened at 2005-01-01 19:41 >Message generated for change (Comment added) made by rurban >You can respond by visiting: >https://sourceforge.net/tracker/?func=detail&atid=306121&aid=1094143&group_id=6121 > >Category: None >Group: None >Status: Open > > >>Resolution: Accepted >> >> >Priority: 5 >Submitted By: Dan F (dfrankow) > > >>Assigned to: Reini Urban (rurban) >> >> >Summary: Put memory usage on every page if debug mode is on > >Initial Comment: >This isn't visually the prettiest, but it works. This >is important information if you wish to keep memory >usage down. I just took it from Reini's unit tests. > >Dan > >cvs diff -bu debug.tmpl >Index: debug.tmpl >=================================================================== >RCS file: .../phpwiki/themes/default/templates/debug.tmpl,v >retrieving revision 1.1.1.1 >diff -b -u -r1.1.1.1 debug.tmpl >--- debug.tmpl 29 Jan 2004 14:30:35 -0000 1.1.1.1 >+++ debug.tmpl 1 Jan 2005 18:37:23 -0000 >@@ -16,6 +16,13 @@ > </div> > </td><td> > <span class="debug"><?=fmt("Page Execution took %s >seconds", $RUNTIMER->getStats())?></span> >+<?php >+if (function_exists('memory_get_usage') and >memory_get_usage()) { >+ $mem = memory_get_usage(); >+ echo "<br/><br/><span class=\debug\>Memory >usage: $mem bytes</span>"; >+} >+?> >+ > </td></tr></table> > <?php // This keeps the valid XHTML! icons from >"hanging off the bottom of the screen" ?> > > >---------------------------------------------------------------------- > > > >>Comment By: Reini Urban (rurban) >> >> >Date: 2005-01-23 01:28 > >Message: >Logged In: YES >user_id=13755 > >Looks fine, just will most likely not work on windows. >Do you want to commit it by yourself? > >---------------------------------------------------------------------- > >You can respond by visiting: >https://sourceforge.net/tracker/?func=detail&atid=306121&aid=1094143&group_id=6121 > > |