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
This commit is contained in:
Roan Kattouw 2018-12-03 15:33:18 -08:00
parent 85e4bc7846
commit 611d9ca6c5

View file

@ -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 */