Phedenskog has uploaded a new change for review.
https://gerrit.wikimedia.org/r/272809
Change subject: Instrument MobileFormatter
......................................................................
Instrument MobileFormatter
Measure the time it takes to filter content for the MobileFormatter
so it is easier to spot changes. This will help us with the change
for lazy loading images and make it easier to know if we have a
performance problem.
Change-Id: I46d8278fe651d5c2eb34b389855a1101d8117232
---
M includes/MobileFormatter.php
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/09/272809/1
diff --git a/includes/MobileFormatter.php b/includes/MobileFormatter.php
index 714f47f..2c80c04 100644
--- a/includes/MobileFormatter.php
+++ b/includes/MobileFormatter.php
@@ -105,6 +105,7 @@
* @return array
*/
public function filterContent( $removeDefaults = true ) {
+ $start = microtime( true );
$ctx = MobileContext::singleton();
$mfRemovableClasses = $ctx->getMFConfig()
->get( 'MFRemovableClasses' );
@@ -130,6 +131,10 @@
}
}
+ $end = microtime( true );
+ $timeMs = 1000 * ( $end - $start );
+ RequestContext::getMain()->getStats()->timing(
"mobile.htmlformatter", $timeMs );
+
return parent::filterContent();
}
--
To view, visit https://gerrit.wikimedia.org/r/272809
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I46d8278fe651d5c2eb34b389855a1101d8117232
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Phedenskog <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits