Wizardist has uploaded a new change for review.
https://gerrit.wikimedia.org/r/79050
Change subject: (Bug 45666) Add profiling calls
......................................................................
(Bug 45666) Add profiling calls
Change-Id: I51117b70f44a0bf6052e674c4cb202896ca1b780
---
M NamespaceRelations.php
M NamespaceRelations_body.php
2 files changed, 8 insertions(+), 1 deletion(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/NamespaceRelations
refs/changes/50/79050/1
diff --git a/NamespaceRelations.php b/NamespaceRelations.php
index 11c997e..9f5dc2a 100644
--- a/NamespaceRelations.php
+++ b/NamespaceRelations.php
@@ -14,9 +14,10 @@
// Attaching to hooks
$wgHooks['SkinTemplateNavigation'][] = function( $skinTemplate, &$navigation )
{
+ wfProfileIn( 'NamespaceRelations: wrapper profile' );
$nsRelations = new NamespaceRelations();
$nsRelations->injectTabs( $skinTemplate, $navigation['namespaces'] );
-
+ wfProfileOut( 'NamespaceRelations: wrapper profile' );
return true;
};
diff --git a/NamespaceRelations_body.php b/NamespaceRelations_body.php
index 4388b02..59bd0fe 100644
--- a/NamespaceRelations_body.php
+++ b/NamespaceRelations_body.php
@@ -38,6 +38,7 @@
private $_namespacesSubjectPattern;
public function __construct() {
+ wfProfileIn( 'NamespaceRelations: ' . __METHOD__ );
global $wgNamespaceRelations;
$this->_namespaces = array();
@@ -67,6 +68,7 @@
$this->addToTarget( $data['target'], $key );
}
}
+ wfProfileOut( 'NamespaceRelations: ' . __METHOD__ );
}
/**
@@ -180,6 +182,7 @@
return;
}
+ wfProfileIn( 'NamespaceRelations: tabs assembly in ' .
__METHOD__ );
$this->sortNavigation( $tabs ); // sort the tabs according to
their weights
$navigation = array(); // rebuild the navigation
@@ -197,6 +200,7 @@
// for subject/talk it's essential, otherwise MediaWiki
will just ignore it
$navigation[$tabId]['context'] = $key;
}
+ wfProfileOut( 'NamespaceRelations: tabs assembly in ' .
__METHOD__ );
}
/**
@@ -269,6 +273,7 @@
* @return array
*/
private function makeTab( $tabNS, $tabTitle, $options = array() ) {
+ wfProfileIn( 'NamespaceRelations: ' . __METHOD__ );
$defaultOptions = array(
'messages' => array(),
'isActive' => false,
@@ -283,6 +288,7 @@
$options['title'] = Title::makeTitle( $tabNS, $tabTitle
);
}
+ wfProfileOut( 'NamespaceRelations: ' . __METHOD__ );
return $options;
}
--
To view, visit https://gerrit.wikimedia.org/r/79050
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I51117b70f44a0bf6052e674c4cb202896ca1b780
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/NamespaceRelations
Gerrit-Branch: master
Gerrit-Owner: Wizardist <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits