summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2014-02-10 13:18:19 (GMT)
committerThomas Bruederli <thomas@roundcube.net>2014-02-10 13:18:19 (GMT)
commitbd29d31860e88f2a9c7a5da8725c7b4c6b13befc (patch)
tree9825af05a161c085a304a4efbd1c704bc568a643
parent78a7047f1837b7c78ea8c6b39382d63ecd255627 (diff)
downloadiRony-bd29d31860e88f2a9c7a5da8725c7b4c6b13befc.tar.gz
Log memory usage in MB
-rw-r--r--lib/Kolab/Utils/DAVLogger.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Kolab/Utils/DAVLogger.php b/lib/Kolab/Utils/DAVLogger.php
index 311fc8a..b45d094 100644
--- a/lib/Kolab/Utils/DAVLogger.php
+++ b/lib/Kolab/Utils/DAVLogger.php
@@ -132,9 +132,9 @@ class DAVLogger extends DAV\ServerPlugin
$time = microtime(true) - KOLAB_DAV_START;
if (function_exists('memory_get_usage'))
- $mem = round(memory_get_usage() / 1024) . 'K';
+ $mem = round(memory_get_usage() / 1024 / 1024, 1) . 'MB';
if (function_exists('memory_get_peak_usage'))
- $mem .= '/' . round(memory_get_peak_usage() / 1024) . 'K';
+ $mem .= '/' . round(memory_get_peak_usage() / 1024 / 1024, 1) . 'MB';
$this->write_log('console', sprintf("/%s: %0.4f sec; %s", $this->method, $time, $mem));
}