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