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