93 bool $doSample =
false,
94 string $sourceLabel =
''
96 $renderedRevision = $this->renderer->getRenderedRevision(
102 'previous-output' => $previousOutput,
106 $parserOutput = $renderedRevision->getRevisionParserOutput();
110 $content = $this->revision->getContent( SlotRecord::MAIN );
112 'source' => $sourceLabel,
113 'type' => $previousOutput ===
null ?
'full' :
'selective',
114 'reason' => $this->parserOptions->getRenderReason(),
115 'parser' => $this->parserOptions->getUseParsoid() ?
'parsoid' :
'legacy',
116 'opportunistic' =>
'false',
117 'wiki' => WikiMap::getCurrentWikiId(),
118 'model' => $content ? $content->getModel() :
'unknown',
120 $totalStat = $stats->getCounter(
'ParserCache_selective_total' );
121 $timeStat = $stats->getCounter(
'ParserCache_selective_cpu_seconds' );
122 foreach ( $labels as $key => $value ) {
123 $totalStat->setLabel( $key, $value );
124 $timeStat->setLabel( $key, $value );
126 $totalStat->increment();
127 $timeStat->incrementBy( $parserOutput->getTimeProfile(
'cpu' ) );
130 return Status::newGood( $parserOutput );