Go to the documentation of this file.
43 return $this->sprofiler->scopedProfileIn( $section );
50 return $this->sprofiler->getFunctionStats();
75 usort( $data,
function ( $a, $b ) {
76 return $b[
'real'] <=> $a[
'real'];
80 $nameWidth = $width - 65;
81 $format =
"%-{$nameWidth}s %6d %9d %9d %9d %9d %7.3f%% %9d";
83 $out[] = sprintf(
"%-{$nameWidth}s %6s %9s %9s %9s %9s %7s %9s",
84 'Name',
'Calls',
'Total',
'Min',
'Each',
'Max',
'%',
'Mem'
86 foreach ( $data as $stats ) {
87 $out[] = sprintf( $format,
90 $stats[
'real'] * 1000,
91 $stats[
'min_real'] * 1000,
92 $stats[
'real'] / $stats[
'calls'] * 1000,
93 $stats[
'max_real'] * 1000,
98 return implode(
"\n", $out );
Profiler that only tracks explicit profiling sections.
getFunctionReport()
Get a report of profiled functions sorted by inclusive wall clock time in descending order.
Profiler base class that defines the interface and some trivial functionality.
Custom PHP profiler for parser/DB type section names that xhprof/xdebug can't handle.
getFunctionStats()
Get the aggregated inclusive profiling data for each method.
scopedProfileIn( $section)
Mark the start of a custom profiling frame (e.g.
close()
Close opened profiling sections.
getOutput()
Returns a profiling output to be stored in debug file.
__construct(array $params=[])
array $params
All of the params passed from $wgProfiler.
SectionProfiler $sprofiler