Catrope has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/179025

Change subject: Add timing data for the first transaction
......................................................................

Add timing data for the first transaction

This doesn't quite tell us about the user's first
interaction with VE (if they open a dialog, for
instance, it could be minutes before that results
in a transaction), but it's a good start.

Change-Id: I6bac987332802d7363ed65a471b2b1ece67086d8
---
M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/25/179025/1

diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
index 9a6bc96..b617c98 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
@@ -424,6 +424,7 @@
  * @method
  */
 ve.init.mw.ViewPageTarget.prototype.onSurfaceReady = function () {
+       var surfaceReadyTime = ve.now();
        if ( !this.activating ) {
                // Activation was aborted before we got here. Do nothing
                // TODO are there things we need to clean up?
@@ -440,6 +441,11 @@
                this.surface.mwTocWidget = new ve.ui.MWTocWidget( this.surface 
);
        }
 
+       // 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
        this.transformPageTitle();
        this.changeDocumentTitle();

-- 
To view, visit https://gerrit.wikimedia.org/r/179025
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6bac987332802d7363ed65a471b2b1ece67086d8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to