40 public function log( array $stats ) {
41 $prefix = $this->params[
'prefix'] ??
'';
42 $contextStats = MediaWikiServices::getInstance()->getStatsdDataFactory();
44 foreach ( $stats as $stat ) {
45 $key =
"{$prefix}.{$stat['name']}";
48 $cpu = round( $stat[
'cpu'] * 1000 );
49 $real = round( $stat[
'real'] * 1000 );
51 $contextStats->increment(
"{$key}.calls" );
52 $contextStats->timing(
"{$key}.cpu", $cpu );
53 $contextStats->timing(
"{$key}.real", $real );
ProfilerOutput class that flushes profiling data to the profiling context's stats buffer.
log(array $stats)
Flush profiling data to the current profiling context's stats buffer.
Base class for profiling output.