Gilles has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/229340

Change subject: Add most common non-bucket size to statsv performance tracking
......................................................................

Add most common non-bucket size to statsv performance tracking

Bug: T105681
Change-Id: I11e971141455d41e935543e3a06f587ebcd070ef
---
M resources/mmv/logging/mmv.logging.PerformanceLogger.js
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer 
refs/changes/40/229340/1

diff --git a/resources/mmv/logging/mmv.logging.PerformanceLogger.js 
b/resources/mmv/logging/mmv.logging.PerformanceLogger.js
index 75c46e0..6b2a594 100644
--- a/resources/mmv/logging/mmv.logging.PerformanceLogger.js
+++ b/resources/mmv/logging/mmv.logging.PerformanceLogger.js
@@ -416,11 +416,14 @@
         * @inheritdoc
         */
        PL.log = function ( data ) {
+               var trackedWidths = 
mw.mmv.ThumbnailWidthCalculator.prototype.defaultOptions.widthBuckets.slice(0);
+               trackedWidths.push( 600 ); // Most common non-bucket size
+
                // Track thumbnail load time with statsv, unsampled
                if ( data.type === 'image'
                        && data.imageWidth > 0
                        && data.total > 20
-                       && $.inArray( data.imageWidth, 
mw.mmv.ThumbnailWidthCalculator.prototype.defaultOptions.widthBuckets ) !== -1 
) {
+                       && $.inArray( data.imageWidth, trackedWidths ) !== -1 ) 
{
                        mw.track( 'timing.media.thumbnail.client.' + 
data.imageWidth , data.total );
                }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/229340
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I11e971141455d41e935543e3a06f587ebcd070ef
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: master
Gerrit-Owner: Gilles <gdu...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to