From 426356e8220fa2da1ce580b339aff13f4430cb92 Mon Sep 17 00:00:00 2001 From: Piotr Miazga Date: Wed, 5 Jul 2017 19:36:17 +0200 Subject: [PATCH] Remove duplicate events filtering We had instrumentation for over 4 weeks and duplicate events rate was very low. We want to keep stats so we check the duplicate events rate but there is no need to filter those. Bug: T167365 Change-Id: I72585beb21e9db589e45eeace657ef25f432abc9 --- resources/dist/index.js | Bin 35542 -> 35596 bytes resources/dist/index.js.map | Bin 285092 -> 285758 bytes src/changeListeners/eventLogging.js | 29 ++++++++++++------ .../changeListeners/eventLogging.test.js | 13 +++++--- 4 files changed, 29 insertions(+), 13 deletions(-) diff --git a/resources/dist/index.js b/resources/dist/index.js index 15db5ddc515e062a2c831fac4ca151958c3ea382..b78a6f4b0688faad9af9768b79587c632d9c419b 100644 GIT binary patch delta 283 zcmcaMm8oYM(}sM_$$u3%<;(IjQxpsoZEaKaax(L>J@ZOZixQJdGV}97^0QO(Chu#P zm|Uf)&zL`Xm1Y2A@#Oku>B$eA*e8ETUFJqy={hO4IS>JzG+RXj>l8ILjUtT{O(2!2k*Je0Iaf=P z9Vla{lczB`F++6nTrCA2O`Uv=QXP;YxS;st-&&mRnn2@<^-?QJQu9(Y6b*EM&dJeB xN-R!wNh|>xrm2&rrdFb%1a^R4Kz>1KL9r4@I2GZh)D(@B$%zKCn{%}@;{o#;VLt!> delta 223 zcmeB~#&m5e(}sM_$xAe?CRa6aPkyQC#+X0ZKugW1*tWV>ClN?k7p0bz7Ue0VmF6Xv zWaj5-l!p^Z=9T#5r>AG;rR(I_7C;1aQfw6staH@VG>SBeb#f*% zMv1a$0(p};wDlxI^0QO(lynR=L8^dcrbePp4pi1$9V(b(o3EEzQIeXMqM>M@19VD( sUQ%Lls!L)CNU=`JGEyfs2v>-0LPk0HUIzs diff --git a/resources/dist/index.js.map b/resources/dist/index.js.map index e550622a77be6cdde2c39a63940633477be9c89d..f8cd3114faacdcc40a2b366818eba5456b74f9a1 100644 GIT binary patch delta 15798 zc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j zi?D-f;EI%iv`8v|tuSAG&e<9f3ka*GR@l{rYZAYAwWGJJY?hI|CG*Ocrw0>iq(kO? zuM`KOruxd=0~Pb;D+lK`84~eqV^RU(u`Vjnu}o{03_^AbWM<16ifAAeuTUAY22#Z^ zaq8cvNY)&A_0(-O^}{>fV&kO{O}Be(io^ldaL(jkJ>rMU;%V>!^ds{BTAGeT z)d%s~0{sZCiJ7mydg`VG1WM(GOD20`eKYjK1Y1Bh2SOH>^qifhj z6tIqlh9m&*sQIr4qoWOT&sT;!;RXBvV#+Tbw7uPVOJ#gwj{mSV8UVIYGWvsVF#*i{dbuz}Ujj>EAqb&jzC;H_$n&PaYAR1#=5vkL+Upv`B ziIB$sx`>V8AA9nXqTSrZClR738YJ-WFzsvrF_hf+KeK|W7r@T5U$}_%eVs*qK$`8_ zDFLxMB0G!tpd+jUZ|dqm&NN>?G1$^({HA&F^}s8pDMlX&CSqeB?#X(#*?@j)F(1|x@gj`pJQTxkv9gIPms82lxC_d)NQE-FoinJzsnKyMMf= acIN*F-WK4!`RLDoyyxwo|M)jPyzzf*Wyh%i diff --git a/src/changeListeners/eventLogging.js b/src/changeListeners/eventLogging.js index c54872555..abb8de163 100644 --- a/src/changeListeners/eventLogging.js +++ b/src/changeListeners/eventLogging.js @@ -28,6 +28,16 @@ function fnv1a32( string ) { /* eslint-enable no-bitwise */ } +/** + * Check if event is an interaction event + * + * @param {Object} event Event + * @returns {boolean} + */ +function isInteractionEvent( event ) { + return event.linkInteractionToken !== undefined; +} + /** * Check if token was already used * @@ -111,21 +121,22 @@ module.exports = function ( boundActions, eventLoggingTracker, statsvTracker ) { if ( !event ) { return; } - if ( isDuplicateToken( tokenToSeenMap, event.linkInteractionToken ) ) { - statsvTracker( 'counter.PagePreviews.EventLogging.DuplicateToken', 1 ); - shouldLog = false; - } - if ( isDuplicateEvent( hashToSeenMap, event ) ) { - statsvTracker( 'counter.PagePreviews.EventLogging.DuplicateEvent', 1 ); - shouldLog = false; + + // We log duplicates only for interaction events + if ( isInteractionEvent( event ) ) { + if ( isDuplicateToken( tokenToSeenMap, event.linkInteractionToken ) ) { + shouldLog = false; + statsvTracker( 'counter.PagePreviews.EventLogging.DuplicateToken', 1 ); + } + if ( isDuplicateEvent( hashToSeenMap, event ) ) { + statsvTracker( 'counter.PagePreviews.EventLogging.DuplicateEvent', 1 ); + } } event = $.extend( true, {}, eventLogging.baseData, event ); - if ( shouldLog ) { eventLoggingTracker( 'event.Popups', event ); } - // Dispatch the eventLogged action even if it was a duplicate so that the // state tree can be cleared/updated. boundActions.eventLogged( event ); diff --git a/tests/node-qunit/changeListeners/eventLogging.test.js b/tests/node-qunit/changeListeners/eventLogging.test.js index df7be6ac9..32f3e1be2 100644 --- a/tests/node-qunit/changeListeners/eventLogging.test.js +++ b/tests/node-qunit/changeListeners/eventLogging.test.js @@ -109,7 +109,6 @@ QUnit.test( 'it should handle duplicate events', function ( assert ) { this.eventLoggingTracker.calledTwice, 'It shouldn\'t log the event.' ); - // --- nextState = createState( { @@ -165,7 +164,6 @@ QUnit.test( 'it should handle duplicate tokens', function ( assert ) { ], 'It should increment the duplicate token counter.' ); - assert.ok( this.eventLoggingTracker.calledOnce, 'It shouldn\'t log the event with the duplicate token.' @@ -174,7 +172,8 @@ QUnit.test( 'it should handle duplicate tokens', function ( assert ) { QUnit.test( 'it should handle undefined tokens', function ( assert ) { var state, - state2; + state2, + state3; state = createState( undefined, { action: 'pageLoaded' @@ -184,15 +183,21 @@ QUnit.test( 'it should handle undefined tokens', function ( assert ) { action: 'disabled' } ); + state3 = createState( undefined, { + action: 'disabled' + } ); + this.changeListener( undefined, state ); this.changeListener( undefined, state2 ); + this.changeListener( undefined, state3 ); assert.ok( this.statsvTracker.notCalled, 'It shouldn\'t increment the duplicate token counter.' ); + assert.ok( - this.eventLoggingTracker.calledTwice, + this.eventLoggingTracker.calledThrice, 'It should log the event twice.' ); } );