From 9736bf082c3b631b37bc0fb106ec20b79002e4bf Mon Sep 17 00:00:00 2001 From: Sergio Santoro Date: Thu, 22 May 2014 16:22:12 +0200 Subject: [PATCH] wfDebugMem: Fix binary prefix and improve usability * Fix: wfDebugMem no longer reports kibibytes as kilobytes * Usability: wfDebugMem now uses unit symbols (e.g. KiB) Change-Id: I1ab8aa3ccdb0fdea307913ada4ed42964d7fe960 --- includes/GlobalFunctions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 91724ddd71..d2c7542eb7 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1007,14 +1007,14 @@ function wfDebugTimer() { /** * Send a line giving PHP memory usage. * - * @param bool $exact Print exact values instead of kilobytes (default: false) + * @param bool $exact Print exact byte values instead of kibibytes (default: false) */ function wfDebugMem( $exact = false ) { $mem = memory_get_usage(); if ( !$exact ) { - $mem = floor( $mem / 1024 ) . ' kilobytes'; + $mem = floor( $mem / 1024 ) . ' KiB'; } else { - $mem .= ' bytes'; + $mem .= ' B'; } wfDebug( "Memory usage: $mem\n" ); } -- 2.20.1