+ // Generate a random number between 0.01 and 1.0, included
+ $random = rand( 1, 100 ) / 100.0;
+
+ if ( $random <= $wgPriorityHintsRatio ) {
+ $attribs['importance'] = 'high';
+ $elementTimingName = 'thumbnail-high';
+ } else {
+ // This lets us track that the thumbnail *would* have gotten high priority but didn't.
+ $elementTimingName = 'thumbnail-top';
+ }