diff --git a/modules/controller.js b/modules/controller.js index ff2f2a397..1233f41f2 100644 --- a/modules/controller.js +++ b/modules/controller.js @@ -701,6 +701,7 @@ function update( data, comment, pageName, replyWidget ) { logger( { action: 'saveSuccess', + timing: mw.now() - replyWidget.saveInitiated, // eslint-disable-next-line camelcase revision_id: data.newrevid } ); diff --git a/modules/dt.ui.ReplyWidget.js b/modules/dt.ui.ReplyWidget.js index f55a252b7..5d4237a25 100644 --- a/modules/dt.ui.ReplyWidget.js +++ b/modules/dt.ui.ReplyWidget.js @@ -720,6 +720,7 @@ ReplyWidget.prototype.onReplyClick = function () { this.errorMessage.$element.remove(); } + this.saveInitiated = mw.now(); this.setPending( true ); logger( { action: 'saveIntent' } ); @@ -788,6 +789,7 @@ ReplyWidget.prototype.onReplyClick = function () { logger( { action: 'saveFailure', + timing: mw.now() - widget.saveInitiated, message: code, type: typeMap[ code ] || 'responseUnknown' } );