MediaWiki REL1_31
ProfilerOutputDump.php
Go to the documentation of this file.
1<?php
31
32 protected $suffix = ".xhprof";
33
39 public function canUse() {
40 if ( empty( $this->params['outputDir'] ) ) {
41 return false;
42 }
43 return true;
44 }
45
46 public function log( array $stats ) {
47 $data = $this->collector->getRawData();
48 $filename = sprintf( "%s/%s.%s%s",
49 $this->params['outputDir'],
50 uniqid(),
51 $this->collector->getProfileID(),
52 $this->suffix );
53 file_put_contents( $filename, serialize( $data ) );
54 }
55}
serialize()
Profiler dumping output in xhprof dump file.
log(array $stats)
Log MediaWiki-style profiling data.
canUse()
Can this output type be used?
Base class for profiling output.