MediaWiki master
ProfilerOutput.php
Go to the documentation of this file.
1<?php
8use Psr\Log\LoggerInterface;
9
16abstract class ProfilerOutput {
18 protected $collector;
20 protected $logger;
22 protected $params;
23
28 public function __construct( Profiler $collector, array $params ) {
29 $this->collector = $collector;
30 $this->params = $params;
31 $this->logger = LoggerFactory::getInstance( 'profiler' );
32 }
33
38 public function canUse() {
39 return true;
40 }
41
47 public function logsToOutput() {
48 return false;
49 }
50
59 abstract public function log( array $stats );
60}
Create PSR-3 logger objects.
Base class for profiling output.
canUse()
Can this output type be used?
array $params
Configuration of $wgProfiler.
log(array $stats)
Log MediaWiki-style profiling data.
logsToOutput()
May the log() try to write to standard output?
LoggerInterface $logger
__construct(Profiler $collector, array $params)
Profiler base class that defines the interface and some shared functionality.
Definition Profiler.php:22