From: <var...@us...> - 2014-10-07 08:38:48
|
Revision: 9209 http://sourceforge.net/p/phpwiki/code/9209 Author: vargenau Date: 2014-10-07 08:38:45 +0000 (Tue, 07 Oct 2014) Log Message: ----------- Remove useless function getMemoryUsage Modified Paths: -------------- trunk/lib/stdlib.php trunk/tests/unit/test.php trunk/themes/Sidebar/templates/debug.tmpl trunk/themes/default/templates/debug.tmpl trunk/themes/fusionforge/templates/debug.tmpl trunk/themes/shamino_com/templates/debug.tmpl Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2014-10-07 08:31:56 UTC (rev 9208) +++ trunk/lib/stdlib.php 2014-10-07 08:38:45 UTC (rev 9209) @@ -84,7 +84,6 @@ array_remove($arr,$value) longer_timeout($secs=30) printSimpleTrace($bt) - getMemoryUsage() binary_search($needle, $haystack) is_localhost() javascript_quote_string($s) @@ -1979,14 +1978,6 @@ } /** - * Return the used process memory, in bytes. - */ -function getMemoryUsage() -{ - return memory_get_usage(); -} - -/** * @param var $needle * @param array $haystack one-dimensional numeric array only, no hash * @return integer Modified: trunk/tests/unit/test.php =================================================================== --- trunk/tests/unit/test.php 2014-10-07 08:31:56 UTC (rev 9208) +++ trunk/tests/unit/test.php 2014-10-07 08:38:45 UTC (rev 9209) @@ -120,7 +120,7 @@ require_once 'lib/stdlib.php'; echo "-- MEMORY USAGE: "; $oldmem = $mem; - $mem = getMemoryUsage(); + $mem = memory_get_usage(); if (!$initmem) $initmem = $mem; // old libc on sf.net server doesn't understand "%+4d" echo sprintf("%8d\t[%s%4d]\t[+%4d]\n", $mem, $mem > $oldmem ? "+" : ($mem == $oldmem ? " " : ""), Modified: trunk/themes/Sidebar/templates/debug.tmpl =================================================================== --- trunk/themes/Sidebar/templates/debug.tmpl 2014-10-07 08:31:56 UTC (rev 9208) +++ trunk/themes/Sidebar/templates/debug.tmpl 2014-10-07 08:38:45 UTC (rev 9209) @@ -12,7 +12,7 @@ </div> </td><td> <span class="debug"><?php echo fmt("Page Execution took %s seconds", $RUNTIMER->getStats())?> -<?php if (substr(PHP_OS,0,3) != 'WIN') { $mem = @getMemoryUsage(); PrintXml(fmt(", Memory: %s", $mem)); } ?> +<?php if (substr(PHP_OS,0,3) != 'WIN') { $mem = @memory_get_usage(); PrintXml(fmt(", Memory: %s", $mem)); } ?> </span> </td></tr></table> <br class="clear-floats" /> Modified: trunk/themes/default/templates/debug.tmpl =================================================================== --- trunk/themes/default/templates/debug.tmpl 2014-10-07 08:31:56 UTC (rev 9208) +++ trunk/themes/default/templates/debug.tmpl 2014-10-07 08:38:45 UTC (rev 9209) @@ -13,7 +13,7 @@ </div> </td><td> <span class="debug"><?php echo fmt("Page Execution took %s seconds", $RUNTIMER->getStats())?> -<?php $mem = @getMemoryUsage(); if ($mem) { ?> +<?php $mem = @memory_get_usage(); if ($mem) { ?> <?php echo fmt(", Memory: %s", $mem) ?> <?php } ?> </span> Modified: trunk/themes/fusionforge/templates/debug.tmpl =================================================================== --- trunk/themes/fusionforge/templates/debug.tmpl 2014-10-07 08:31:56 UTC (rev 9208) +++ trunk/themes/fusionforge/templates/debug.tmpl 2014-10-07 08:38:45 UTC (rev 9209) @@ -2,7 +2,7 @@ <?php global $RUNTIMER; echo fmt("Page Execution took %s seconds", $RUNTIMER->getStats()); -$mem = @getMemoryUsage(); +$mem = @memory_get_usage(); if ($mem) { echo fmt(", Memory: %s", $mem); } Modified: trunk/themes/shamino_com/templates/debug.tmpl =================================================================== --- trunk/themes/shamino_com/templates/debug.tmpl 2014-10-07 08:31:56 UTC (rev 9208) +++ trunk/themes/shamino_com/templates/debug.tmpl 2014-10-07 08:38:45 UTC (rev 9209) @@ -4,7 +4,7 @@ <span id="xhtml-validator"><a class="wikilink" href="http://validator.w3.org/check/referer">Valid XHTML 1.0</a> <a class="wikilink" href="http://jigsaw.w3.org/css-validator/check/referer">Valid CSS</a> </span> <span><?php echo fmt("Page Execution took %s seconds", $RUNTIMER->getStats()) ?> -<?php $mem = @getMemoryUsage(); if ($mem) { ?> +<?php $mem = @memory_get_usage(); if ($mem) { ?> <?php echo fmt(", Memory: %s", $mem) ?> <?php } ?></span></div> <br class="clear-floats" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |