mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 06:46:26 +00:00
Merge "Add timing data for the first transaction"
This commit is contained in:
commit
eacb364ed1
|
@ -424,6 +424,7 @@ ve.init.mw.ViewPageTarget.prototype.onLoadError = function ( jqXHR, status ) {
|
||||||
* @method
|
* @method
|
||||||
*/
|
*/
|
||||||
ve.init.mw.ViewPageTarget.prototype.onSurfaceReady = function () {
|
ve.init.mw.ViewPageTarget.prototype.onSurfaceReady = function () {
|
||||||
|
var surfaceReadyTime = ve.now();
|
||||||
if ( !this.activating ) {
|
if ( !this.activating ) {
|
||||||
// Activation was aborted before we got here. Do nothing
|
// Activation was aborted before we got here. Do nothing
|
||||||
// TODO are there things we need to clean up?
|
// TODO are there things we need to clean up?
|
||||||
|
@ -439,6 +440,11 @@ ve.init.mw.ViewPageTarget.prototype.onSurfaceReady = function () {
|
||||||
this.getSurface().mwTocWidget = new ve.ui.MWTocWidget( this.getSurface() );
|
this.getSurface().mwTocWidget = new ve.ui.MWTocWidget( this.getSurface() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Track how long it takes for the first transaction to happen
|
||||||
|
this.surface.getModel().getDocument().once( 'transact', function () {
|
||||||
|
ve.track( 'mwtiming.behavior.firstTransaction', { duration: ve.now() - surfaceReadyTime } );
|
||||||
|
} );
|
||||||
|
|
||||||
// Update UI
|
// Update UI
|
||||||
this.transformPageTitle();
|
this.transformPageTitle();
|
||||||
this.changeDocumentTitle();
|
this.changeDocumentTitle();
|
||||||
|
|
Loading…
Reference in a new issue