From 611d9ca6c5eec123c61029e0129e28a7aa2bea58 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Mon, 3 Dec 2018 15:33:18 -0800 Subject: [PATCH] trackSubscriber: Set timing property to a number, not an object The timing variable is a private closure variable containing an object that tracks the timestamps of different events in the current cycle. The duration variable is the result of using that information to compute the difference between the current timestamp and the relevant anchor timestamp. For the '_timing' property in the EventLogging data, duration is the correct value, not timing. (This is confusing and we should probably rename the timing variable.) Change-Id: Iff78eb0ab83c84b73ad5c8f3eb85b1c7f120ebef Follows-Up: Ifc2135d99f4bec917dac60992098958b72c37fc6 --- modules/ve-mw/init/ve.init.mw.trackSubscriber.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ve-mw/init/ve.init.mw.trackSubscriber.js b/modules/ve-mw/init/ve.init.mw.trackSubscriber.js index d07126c7cc..ccf62598b5 100644 --- a/modules/ve-mw/init/ve.init.mw.trackSubscriber.js +++ b/modules/ve-mw/init/ve.init.mw.trackSubscriber.js @@ -150,7 +150,7 @@ event[ actionPrefix + '_mechanism' ] = event.mechanism; if ( action !== 'init' ) { duration = Math.round( computeDuration( action, event, timeStamp ) ); - event[ actionPrefix + '_timing' ] = timing; + event[ actionPrefix + '_timing' ] = duration; } event[ actionPrefix + '_message' ] = event.message; /* eslint-enable camelcase */