From: Max Semenik Date: Thu, 19 Sep 2013 23:02:59 +0000 (-0700) Subject: Collect stats about RL cache hit rate X-Git-Tag: 1.31.0-rc.0~18720^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/ajouter.php?a=commitdiff_plain;h=fd4d0ec25430cce439fd7e1b265ccfb61cdac9bf;p=lhc%2Fweb%2Fwiklou.git Collect stats about RL cache hit rate Change-Id: I7cf2f2248f60b0e686e90faf9cb9989b723c88d1 --- diff --git a/includes/resourceloader/ResourceLoader.php b/includes/resourceloader/ResourceLoader.php index 704d781e87..b943dd0ba0 100644 --- a/includes/resourceloader/ResourceLoader.php +++ b/includes/resourceloader/ResourceLoader.php @@ -153,6 +153,7 @@ class ResourceLoader { $cache = wfGetCache( CACHE_ANYTHING ); $cacheEntry = $cache->get( $key ); if ( is_string( $cacheEntry ) ) { + wfIncrStats( "rl-$filter-cache-hits" ); wfProfileOut( __METHOD__ ); return $cacheEntry; } @@ -160,6 +161,7 @@ class ResourceLoader { $result = ''; // Run the filter - we've already verified one of these will work try { + wfIncrStats( "rl-$filter-cache-misses" ); switch ( $filter ) { case 'minify-js': $result = JavaScriptMinifier::minify( $data,