MediaWiki
REL1_34
ProfilerOutputDump.php
Go to the documentation of this file.
1
<?php
31
class
ProfilerOutputDump
extends
ProfilerOutput
{
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
serialize()
Definition
ApiMessageTrait.php:138
ProfilerOutputDump
Definition
ProfilerOutputDump.php:31
ProfilerOutputDump\log
log(array $stats)
Log MediaWiki-style profiling data.
Definition
ProfilerOutputDump.php:47
ProfilerOutputDump\$suffix
$suffix
Definition
ProfilerOutputDump.php:33
ProfilerOutputDump\canUse
canUse()
Can this output type be used?
Definition
ProfilerOutputDump.php:40
ProfilerOutput
Base class for profiling output.
Definition
ProfilerOutput.php:27
includes
profiler
output
ProfilerOutputDump.php
Generated on Mon Nov 25 2024 16:05:36 for MediaWiki by
1.10.0