xhprof: discard section profiler running totals
The '-total' record from the section profiler used for measuring sub-function timing is not useful in the cumulative xhprof report data. Change-Id: Ieb79b0e82e0bed54653fab016c133cc74ec4f637
This commit is contained in:
parent
4449c9bcfa
commit
9904a823b0
1 changed files with 5 additions and 0 deletions
|
|
@ -139,6 +139,11 @@ class ProfilerXhprof extends Profiler {
|
|||
|
||||
// Merge in all of the custom profile sections
|
||||
foreach ( $this->sprofiler->getFunctionStats() as $stats ) {
|
||||
if ( $stats['name'] === '-total' ) {
|
||||
// Discard section profiler running totals
|
||||
continue;
|
||||
}
|
||||
|
||||
// @note: getFunctionStats() values already in ms
|
||||
$stats['%real'] = $stats['real'] / $main['real'] * 100;
|
||||
$stats['%cpu'] = $main['cpu'] ? $stats['cpu'] / $main['cpu'] * 100 : 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue