poolcounter: Add 'trigger' field to the slow-parse log
authorTimo Tijhof <krinklemail@gmail.com>
Fri, 23 Oct 2015 18:33:52 +0000 (19:33 +0100)
committerKrinkle <krinklemail@gmail.com>
Fri, 23 Oct 2015 20:53:37 +0000 (20:53 +0000)
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

includes/page/WikiPage.php
includes/poolcounter/PoolWorkArticleView.php

index cdaab1a..96b2e27 100644 (file)
@@ -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
index d601467..3c60ea9 100644 (file)
@@ -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',
                        ) );
                }