From: Timo Tijhof Date: Fri, 23 Oct 2015 18:33:52 +0000 (+0100) Subject: poolcounter: Add 'trigger' field to the slow-parse log X-Git-Tag: 1.31.0-rc.0~9277^2 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=c45305bcd307752362dcacc660ee333286512b1c;p=lhc%2Fweb%2Fwiklou.git poolcounter: Add 'trigger' field to the slow-parse log To better indicate that these are only triggered by page views. We don't currently have any slow-parse logging for the parser invocation that happens during save (which means we're potentially missing lots of them). Once we add that, this will help distinguish them. Bug: T110760 Change-Id: I22be5684ef93efd410d683637e223f770d6c768c --- diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index cdaab1a6eb..96b2e2777e 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -1092,7 +1092,9 @@ class WikiPage implements Page, IDBAccessObject { /** * Get a ParserOutput for the given ParserOptions and revision ID. - * The parser cache will be used if possible. + * + * The parser cache will be used if possible. Cache misses that result + * in parser runs are debounced with PoolCounter. * * @since 1.19 * @param ParserOptions $parserOptions ParserOptions to use for the parse operation diff --git a/includes/poolcounter/PoolWorkArticleView.php b/includes/poolcounter/PoolWorkArticleView.php index d601467d01..3c60ea9f53 100644 --- a/includes/poolcounter/PoolWorkArticleView.php +++ b/includes/poolcounter/PoolWorkArticleView.php @@ -147,6 +147,7 @@ class PoolWorkArticleView extends PoolCounterWork { $logger->info( '{time} {title}', array( 'time' => number_format( $time, 2 ), 'title' => $this->page->getTitle()->getPrefixedDBkey(), + 'trigger' => 'view', ) ); }