Add get_memory_peak_usage() info to profile link

pull/2487/head
Yannick Warnier 9 years ago
parent 746f74788e
commit 0c3fedf2af
  1. 3
      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 '<a style="z-index:99; position: absolute;" href="'. $profiler_url .'" target="_blank">Profiler output</a>';
$mem = round(memory_get_peak_usage()/1024);
echo '<a style="z-index:99; position: absolute;" href="'. $profiler_url .'" target="_blank">Profiler output (Memory: '.$mem.'KB)</a>';
}

Loading…
Cancel
Save