Merge "Invalidate slow function call cache to avoid warnings"

This commit is contained in:
jenkins-bot 2018-02-09 19:00:32 +00:00 committed by Gerrit Code Review
commit e5b57f10ee

View file

@ -203,12 +203,13 @@ class ScribuntoHooks {
// To control the sampling rate, we keep a compact histogram of
// observations in APC, and extract the Nth percentile (specified
// via $wgScribuntoSlowFunctionThreshold; defaults to 0.90).
// We need APC and \RunningStat\PSquare to do that.
// We need APC and \Wikimedia\PSquare to do that.
if ( !class_exists( PSquare::class ) || $cache instanceof EmptyBagOStuff ) {
return;
}
$key = $cache->makeGlobalKey( __METHOD__, $threshold );
$cacheVersion = '1';
$key = $cache->makeGlobalKey( __METHOD__, $cacheVersion, $threshold );
// This is a classic "read-update-write" critical section with no
// mutual exclusion, but the only consequence is that some samples