Just UI ready time and wgBackendResponseTime for now.
Sanitizing responseStart and especially firstPaint cross-browser
is too messy. NavigationTiming has code for it but that would
need to be exposed somewhere.
Bug: T176652
Change-Id: I6caf52fe8bc77fac0426d73549553301c5951c32
savedLinksListWidget = new mw.rcfilters.ui.SavedLinksListWidget(
controller, savedQueriesModel, { $overlay: $overlay }
),
savedLinksListWidget = new mw.rcfilters.ui.SavedLinksListWidget(
controller, savedQueriesModel, { $overlay: $overlay }
),
- currentPage = mw.config.get( 'wgCanonicalNamespace' ) +
- ':' +
- mw.config.get( 'wgCanonicalSpecialPageName' );
+ specialPage = mw.config.get( 'wgCanonicalSpecialPageName' );
// TODO: The changesListWrapperWidget should be able to initialize
// after the model is ready.
// TODO: The changesListWrapperWidget should be able to initialize
// after the model is ready.
- if ( currentPage === 'Special:Recentchanges' ||
- currentPage === 'Special:Recentchangeslinked' ) {
+ if ( specialPage === 'Recentchanges' ||
+ specialPage === 'Recentchangeslinked' ) {
$topLinks = $( '.mw-recentchanges-toplinks' ).detach();
rcTopSection = new mw.rcfilters.ui.RcTopSectionWidget(
$topLinks = $( '.mw-recentchanges-toplinks' ).detach();
rcTopSection = new mw.rcfilters.ui.RcTopSectionWidget(
filtersWidget.setTopSection( rcTopSection.$element );
} // end Special:RC
filtersWidget.setTopSection( rcTopSection.$element );
} // end Special:RC
- if ( currentPage === 'Special:Watchlist' ) {
+ if ( specialPage === 'Watchlist' ) {
$( '#contentSub, form#mw-watchlist-resetbutton' ).detach();
$watchlistDetails = $( '.watchlistDetails' ).detach().contents();
$( '#contentSub, form#mw-watchlist-resetbutton' ).detach();
$watchlistDetails = $( '.watchlistDetails' ).detach().contents();
filtersWidget.setTopSection( wlTopSection.$element );
} // end Special:WL
filtersWidget.setTopSection( wlTopSection.$element );
} // end Special:WL
+ // Log performance data
+ if ( window.performance && window.performance.now ) {
+ mw.track(
+ 'timing.MediaWiki.timing.structuredChangeFilters.ready.' + specialPage,
+ window.performance.now()
+ );
+ mw.track(
+ 'timing.MediaWiki.timing.structuredChangeFilters.backendResponse.' + specialPage,
+ mw.config.get( 'wgBackendResponseTime' )
+ );
+ }
+
/**
* Fired when initialization of the filtering interface for changes list is complete.
*
/**
* Fired when initialization of the filtering interface for changes list is complete.
*