From 0c3fedf2af3c31ec39f191825d8219704be20ce2 Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Fri, 23 Dec 2016 11:49:10 -0500 Subject: [PATCH] Add get_memory_peak_usage() info to profile link --- tests/xhprof/footer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/xhprof/footer.php b/tests/xhprof/footer.php index 87c2313e63..13de965e6c 100755 --- a/tests/xhprof/footer.php +++ b/tests/xhprof/footer.php @@ -15,5 +15,6 @@ if (extension_loaded('tideways')) { // url to the XHProf UI libraries (change the host name and path) $subDir = substr(__DIR__, strlen(trim($_SERVER['DOCUMENT_ROOT']))); $profiler_url = sprintf($subDir.'/xhprof_html/index.php?run=%s&source=%s', $run_id, $profiler_namespace); - echo 'Profiler output'; + $mem = round(memory_get_peak_usage()/1024); + echo 'Profiler output (Memory: '.$mem.'KB)'; }