From 1f15ff3dd15e86cf7c6edbf2d0886dc8b8c87429 Mon Sep 17 00:00:00 2001 From: rurban Date: Tue, 25 Jan 2005 07:10:52 +0000 Subject: [PATCH] add getMemoryUsage to stdlib git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@4429 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/stdlib.php | 36 ++++++++++++++++++++++++++++- tests/unit/test.php | 27 +++------------------- themes/default/templates/debug.tmpl | 6 +++-- 3 files changed, 42 insertions(+), 27 deletions(-) diff --git a/lib/stdlib.php b/lib/stdlib.php index 6d3c52f0c..e0734d9da 100644 --- a/lib/stdlib.php +++ b/lib/stdlib.php @@ -1,4 +1,4 @@ - $oldmem ? "+" : ($mem == $oldmem ? " " : ""), $mem - $oldmem, $mem - $initmem); + echo sprintf("%8d\t[%s%4d]\t[+%4d]\n", $mem, $mem > $oldmem ? "+" : ($mem == $oldmem ? " " : ""), + $mem - $oldmem, $mem - $initmem); // TODO: print time flush(); } diff --git a/themes/default/templates/debug.tmpl b/themes/default/templates/debug.tmpl index cb0e13662..a55d4c3a3 100644 --- a/themes/default/templates/debug.tmpl +++ b/themes/default/templates/debug.tmpl @@ -1,5 +1,5 @@ @@ -15,7 +15,9 @@ alt="Valid CSS!" height="31" width="88" />
-getStats())?> +getStats())?> + +

-- 2.45.0