MediaWiki
REL1_32
ProfilerOutputDump.php
Go to the documentation of this file.
1
<?php
30
class
ProfilerOutputDump
extends
ProfilerOutput
{
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
serialize()
Definition
ApiMessageTrait.php:131
ProfilerOutputDump
Profiler dumping output in xhprof dump file.
Definition
ProfilerOutputDump.php:30
ProfilerOutputDump\log
log(array $stats)
Log MediaWiki-style profiling data.
Definition
ProfilerOutputDump.php:46
ProfilerOutputDump\$suffix
$suffix
Definition
ProfilerOutputDump.php:32
ProfilerOutputDump\canUse
canUse()
Can this output type be used?
Definition
ProfilerOutputDump.php:39
ProfilerOutput
Base class for profiling output.
Definition
ProfilerOutput.php:27
array
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))
includes
profiler
output
ProfilerOutputDump.php
Generated on Mon Nov 25 2024 15:57:30 for MediaWiki by
1.10.0