BryanDavis has uploaded a new change for review.
https://gerrit.wikimedia.org/r/180687
Change subject: xhprof: discard section profiler running totals
......................................................................
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
---
M includes/profiler/ProfilerXhprof.php
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/87/180687/1
diff --git a/includes/profiler/ProfilerXhprof.php
b/includes/profiler/ProfilerXhprof.php
index 162ec00..ba35b8e 100644
--- a/includes/profiler/ProfilerXhprof.php
+++ b/includes/profiler/ProfilerXhprof.php
@@ -139,6 +139,11 @@
// 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;
--
To view, visit https://gerrit.wikimedia.org/r/180687
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieb79b0e82e0bed54653fab016c133cc74ec4f637
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: BryanDavis <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits