MediaWiki REL1_32
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.
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))