From: Bryan Davis Date: Wed, 17 Dec 2014 23:36:04 +0000 (-0700) Subject: xhprof: Fix magnitude of %real measurements from scoped profiler X-Git-Tag: 1.31.0-rc.0~12928 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=4449c9bcfae21e61052a9f8356ae7981744c4765 xhprof: Fix magnitude of %real measurements from scoped profiler Change-Id: I06e5b3d82cfddd1a407c56819c9bdd91f160e928 --- diff --git a/includes/profiler/ProfilerXhprof.php b/includes/profiler/ProfilerXhprof.php index a40c44ab60..162ec00653 100644 --- a/includes/profiler/ProfilerXhprof.php +++ b/includes/profiler/ProfilerXhprof.php @@ -140,7 +140,7 @@ class ProfilerXhprof extends Profiler { // Merge in all of the custom profile sections foreach ( $this->sprofiler->getFunctionStats() as $stats ) { // @note: getFunctionStats() values already in ms - $stats['%real'] = $stats['real'] / $main['real']; + $stats['%real'] = $stats['real'] / $main['real'] * 100; $stats['%cpu'] = $main['cpu'] ? $stats['cpu'] / $main['cpu'] * 100 : 0; $stats['%memory'] = $main['memory'] ? $stats['memory'] / $main['memory'] * 100 : 0; $profile[] = $stats; // assume no section names collide with $metrics