Jforrester has uploaded a new change for review.
https://gerrit.wikimedia.org/r/197829
Change subject: Set mwtiming events' target to 'mwTarget', if unset
......................................................................
Set mwtiming events' target to 'mwTarget', if unset
We're currently rewriting "mwtiming.performance.system.domLoad" to
"timing.ve.undefined.performance.system.domLoad". The "undefined" comes from
the missing targetName property on the event. I'm not sure why it is missing,
but having it default to 'mwTarget' will Do the Right Thing™.
Task: T93156
Change-Id: If70ff601b6c54ec8f95171cbc43c82c87a177508
(cherry picked from commit 94877eb668f4c534805643554007d649b8597f9d)
---
M modules/ve-mw/init/ve.init.mw.trackSubscriber.js
1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor
refs/changes/29/197829/1
diff --git a/modules/ve-mw/init/ve.init.mw.trackSubscriber.js
b/modules/ve-mw/init/ve.init.mw.trackSubscriber.js
index b1c7356..03d34e9 100644
--- a/modules/ve-mw/init/ve.init.mw.trackSubscriber.js
+++ b/modules/ve-mw/init/ve.init.mw.trackSubscriber.js
@@ -133,13 +133,15 @@
} );
ve.trackSubscribe( 'mwtiming.', function ( topic, data ) {
+ var target;
// Add type for save errors; not in the topic for stupid
historical reasons
if ( topic === 'mwtiming.performance.user.saveError' ) {
topic = topic + '.' + data.type;
}
+ target = data.targetName || 'mwTarget';
// Map mwtiming.foo --> timing.ve.foo.mobile
- topic = topic.replace( /^mwtiming/, 'timing.ve.' +
data.targetName );
+ topic = topic.replace( /^mwtiming/, 'timing.ve.' + target );
mw.track( topic, data.duration );
} );
--
To view, visit https://gerrit.wikimedia.org/r/197829
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If70ff601b6c54ec8f95171cbc43c82c87a177508
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: wmf/1.25wmf22
Gerrit-Owner: Jforrester <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits